Changeset 7341

Show
Ignore:
Timestamp:
03/17/08 03:26:53 (6 months ago)
Author:
markjaquith
Message:

Bring Edit Page screen up to parity with Edit Post screen WRT timestamps. see #6250

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/edit-page-form.php

    r7340 r7341  
    7777<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> 
    7878<?php 
    79  
    8079if ($post_ID) { 
    81  
    82     if ( 'future' == $post->post_status ) { 
     80    if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date 
    8381        $stamp = __('Scheduled for:<br />%1$s at %2$s'); 
    84     } else if ( 'publish' == $post->post_status ) { 
    85         $stamp = __('%1$s at %2$s'); 
    86     } else { 
    87         $stamp = __('Saved on:<br />%1$s at %2$s'); 
     82    } else if ( 'publish' == $post->post_status ) { // already published 
     83        $stamp = __('Published on:<br />%1$s at %2$s'); 
     84    } else if ( '0000-00-00 00:00:00' == $post->post_date ) { // draft, 1 or more saves, no date specified 
     85        $stamp = __('Publish immediately'); 
     86    } else { // draft, 1 or more saves, date specified 
     87        $stamp = __('Publish on:<br />%1$s at %2$s'); 
    8888    } 
    89  
    9089    $date = mysql2date(get_option('date_format'), $post->post_date); 
    9190    $time = mysql2date(get_option('time_format'), $post->post_date); 
    92 } else { 
    93     $stamp = __('%1$s at %2$s'); 
     91} else { // draft (no saves, and thus no date specified) 
     92    $stamp = __('Publish immediately'); 
    9493    $date = mysql2date(get_option('date_format'), current_time('mysql')); 
    9594    $time = mysql2date(get_option('time_format'), current_time('mysql')); 
  • trunk/wp-admin/js/page.js

    r7325 r7341  
    99        if (jQuery('#timestampdiv').is(":hidden")) { 
    1010            jQuery('#timestampdiv').slideDown("normal"); 
     11            jQuery('.edit-timestamp').text(postL10n.cancel); 
    1112        } else { 
    1213            jQuery('#timestampdiv').hide(); 
     14            jQuery('#mm').val(jQuery('#hidden_mm').val()); 
     15            jQuery('#jj').val(jQuery('#hidden_jj').val()); 
     16            jQuery('#aa').val(jQuery('#hidden_aa').val()); 
     17            jQuery('#hh').val(jQuery('#hidden_hh').val()); 
     18            jQuery('#mn').val(jQuery('#hidden_mn').val()); 
     19            jQuery('.edit-timestamp').text(postL10n.edit); 
    1320        } 
    1421        return false; 
  • trunk/wp-includes/script-loader.php

    r7338 r7341  
    152152            ) ); 
    153153            $this->add( 'page', '/wp-admin/js/page.js', array('jquery', 'slug', 'postbox'), '20080208' ); 
     154            $this->localize( 'page', 'postL10n', array( 
     155                'cancel' => __('Cancel'), 
     156                'edit' => __('Edit'), 
     157            ) ); 
    154158            $this->add( 'link', '/wp-admin/js/link.js', array('jquery-ui-tabs', 'wp-lists', 'postbox'), '20080131' ); 
    155159            $this->add( 'comment', '/wp-admin/js/comment.js', array('postbox'), '20080219' );