mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Better date editing from MarkJaquith. see #6250
git-svn-id: https://develop.svn.wordpress.org/trunk@7338 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -74,6 +74,13 @@ function edit_post() {
|
||||
if (!isset( $_POST['ping_status'] ))
|
||||
$_POST['ping_status'] = 'closed';
|
||||
|
||||
foreach ( array ('aa', 'mm', 'jj', 'hh', 'mm') as $timeunit ) {
|
||||
if ( !empty( $_POST['hidden_' . $timeunit] ) && $_POST['hidden_' . $timeunit] != $_POST[$timeunit] ) {
|
||||
$_POST['edit_date'] = '1';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty ( $_POST['edit_date'] ) ) {
|
||||
$aa = $_POST['aa'];
|
||||
$mm = $_POST['mm'];
|
||||
@@ -281,6 +288,13 @@ function wp_write_post() {
|
||||
if (!isset( $_POST['ping_status'] ))
|
||||
$_POST['ping_status'] = 'closed';
|
||||
|
||||
foreach ( array ('aa', 'mm', 'jj', 'hh', 'mm') as $timeunit ) {
|
||||
if ( !empty( $_POST['hidden_' . $timeunit] ) && $_POST['hidden_' . $timeunit] != $_POST[$timeunit] ) {
|
||||
$_POST['edit_date'] = '1';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty ( $_POST['edit_date'] ) ) {
|
||||
$aa = $_POST['aa'];
|
||||
$mm = $_POST['mm'];
|
||||
|
||||
Reference in New Issue
Block a user