diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 4f6e786691..5724ef5ce1 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -100,19 +100,19 @@ else

post_status ) { + if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date $stamp = __('Scheduled for:
%1$s at %2$s'); - } else if ( 'publish' == $post->post_status ) { - $stamp = __('%1$s at %2$s'); - } else { - $stamp = __('Saved on:
%1$s at %2$s'); + } else if ( 'publish' == $post->post_status ) { // already published + $stamp = __('Published on:
%1$s at %2$s'); + } else if ( '0000-00-00 00:00:00' == $post->post_date ) { // draft, 1 or more saves, no date specified + $stamp = __('Publish immediately'); + } else { // draft, 1 or more saves, date specified + $stamp = __('Publish on:
%1$s at %2$s'); } - $date = mysql2date(get_option('date_format'), $post->post_date); $time = mysql2date(get_option('time_format'), $post->post_date); -} else { - $stamp = __('%1$s at %2$s'); +} else { // draft (no saves, and thus no date specified) + $stamp = __('Publish immediately'); $date = mysql2date(get_option('date_format'), current_time('mysql')); $time = mysql2date(get_option('time_format'), current_time('mysql')); } @@ -142,7 +142,13 @@ if ( ( 'edit' == $action) && current_user_can('delete_post', $post_ID) ) ?>
-post_modified), mysql2date(get_option('time_format'), $post->post_modified)); ?> +display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); +} else { + printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); +} +?>
diff --git a/wp-admin/includes/comment.php b/wp-admin/includes/comment.php index f5ee23ad1d..59bd9b6532 100644 --- a/wp-admin/includes/comment.php +++ b/wp-admin/includes/comment.php @@ -21,6 +21,14 @@ function edit_comment() { $_POST['comment_content'] = $_POST['content']; $_POST['comment_ID'] = (int) $_POST['comment_ID']; + 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']; diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index eb43ae92d2..b4db0263a4 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -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']; diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 7175012f29..44d034ca16 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -830,7 +830,7 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0 ) { if ( (int) $tab_index > 0 ) $tab_index_attribute = " tabindex=\"$tab_index\""; - echo '
'; + // echo '
'; $time_adj = time() + (get_option( 'gmt_offset' ) * 3600 ); $post_date = ($for_post) ? $post->post_date : $comment->comment_date; @@ -841,22 +841,26 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0 ) { $mn = ($edit) ? mysql2date( 'i', $post_date ) : gmdate( 'i', $time_adj ); $ss = ($edit) ? mysql2date( 's', $post_date ) : gmdate( 's', $time_adj ); - $month = "\n"; for ( $i = 1; $i < 13; $i = $i +1 ) { - $month .= "\t\t\t\n"; } $month .= ''; - $day = ''; - $year = ''; - $hour = ''; - $minute = ''; - printf(_c('%1$s%2$s%3$s @ %4$s : %5$s|1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input'), $month, $day, $year, $hour, $minute); + $day = ''; + $year = ''; + $hour = ''; + $minute = ''; + printf(_c('%1$s%2$s, %3$s
@ %4$s : %5$s|1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input'), $month, $day, $year, $hour, $minute); + echo "\n\n"; + foreach ( array('mm', 'jj', 'aa', 'hh', 'mn') as $timeunit ) + echo '' . "\n"; ?> - + + attribute_escape(__('Add')), 'addTag' => attribute_escape(__('Add new tag')), 'separate' => __('Separate tags with commas'), + 'cancel' => __('Cancel'), + 'edit' => __('Edit'), ) ); $this->add( 'page', '/wp-admin/js/page.js', array('jquery', 'slug', 'postbox'), '20080208' ); $this->add( 'link', '/wp-admin/js/link.js', array('jquery-ui-tabs', 'wp-lists', 'postbox'), '20080131' );