diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index 6986b566f6..ca64feef34 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -76,21 +76,20 @@ 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')); } diff --git a/wp-admin/js/page.js b/wp-admin/js/page.js index 8fe10fd0b1..5da0e4aaa4 100644 --- a/wp-admin/js/page.js +++ b/wp-admin/js/page.js @@ -8,8 +8,15 @@ jQuery(document).ready( function() { jQuery('.edit-timestamp').click(function () { if (jQuery('#timestampdiv').is(":hidden")) { jQuery('#timestampdiv').slideDown("normal"); + jQuery('.edit-timestamp').text(postL10n.cancel); } else { jQuery('#timestampdiv').hide(); + jQuery('#mm').val(jQuery('#hidden_mm').val()); + jQuery('#jj').val(jQuery('#hidden_jj').val()); + jQuery('#aa').val(jQuery('#hidden_aa').val()); + jQuery('#hh').val(jQuery('#hidden_hh').val()); + jQuery('#mn').val(jQuery('#hidden_mn').val()); + jQuery('.edit-timestamp').text(postL10n.edit); } return false; }); diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index c424dd14fa..d108997ab7 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -151,6 +151,10 @@ class WP_Scripts { 'edit' => __('Edit'), ) ); $this->add( 'page', '/wp-admin/js/page.js', array('jquery', 'slug', 'postbox'), '20080208' ); + $this->localize( 'page', 'postL10n', array( + 'cancel' => __('Cancel'), + 'edit' => __('Edit'), + ) ); $this->add( 'link', '/wp-admin/js/link.js', array('jquery-ui-tabs', 'wp-lists', 'postbox'), '20080131' ); $this->add( 'comment', '/wp-admin/js/comment.js', array('postbox'), '20080219' ); $this->add( 'media-upload', '/wp-admin/js/media-upload.js', false, '20080109' );