mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Bring Edit Page screen up to parity with Edit Post screen WRT timestamps. see #6250
git-svn-id: http://svn.automattic.com/wordpress/trunk@7341 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1ef02206f1
commit
0f9573513d
@ -76,21 +76,20 @@ else
|
||||
|
||||
<p><label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="checkbox" value="private" <?php checked($post->post_status, 'private'); ?> /> <?php _e('Keep this page private') ?></label></p>
|
||||
<?php
|
||||
|
||||
if ($post_ID) {
|
||||
|
||||
if ( 'future' == $post->post_status ) {
|
||||
if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
|
||||
$stamp = __('Scheduled for:<br />%1$s at %2$s');
|
||||
} else if ( 'publish' == $post->post_status ) {
|
||||
$stamp = __('%1$s at %2$s');
|
||||
} else {
|
||||
$stamp = __('Saved on:<br />%1$s at %2$s');
|
||||
} else if ( 'publish' == $post->post_status ) { // already published
|
||||
$stamp = __('Published on:<br />%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:<br />%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'));
|
||||
}
|
||||
|
@ -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;
|
||||
});
|
||||
|
@ -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' );
|
||||
|
Loading…
Reference in New Issue
Block a user