Changeset 7338
- Timestamp:
- 03/16/2008 11:05:16 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r7325 r7338 101 101 <?php 102 102 if ($post_ID) { 103 104 if ( 'future' == $post->post_status ) { 103 if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date 105 104 $stamp = __('Scheduled for:<br />%1$s at %2$s'); 106 } else if ( 'publish' == $post->post_status ) { 107 $stamp = __('%1$s at %2$s'); 108 } else { 109 $stamp = __('Saved on:<br />%1$s at %2$s'); 105 } else if ( 'publish' == $post->post_status ) { // already published 106 $stamp = __('Published on:<br />%1$s at %2$s'); 107 } else if ( '0000-00-00 00:00:00' == $post->post_date ) { // draft, 1 or more saves, no date specified 108 $stamp = __('Publish immediately'); 109 } else { // draft, 1 or more saves, date specified 110 $stamp = __('Publish on:<br />%1$s at %2$s'); 110 111 } 111 112 112 $date = mysql2date(get_option('date_format'), $post->post_date); 113 113 $time = mysql2date(get_option('time_format'), $post->post_date); 114 } else { 115 $stamp = __(' %1$s at %2$s');114 } else { // draft (no saves, and thus no date specified) 115 $stamp = __('Publish immediately'); 116 116 $date = mysql2date(get_option('date_format'), current_time('mysql')); 117 117 $time = mysql2date(get_option('time_format'), current_time('mysql')); … … 143 143 <br class="clear" /> 144 144 <?php if ($post_ID): ?> 145 <?php printf(__('Last edit: %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); ?> 145 <?php if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) { 146 $last_user = get_userdata($last_id); 147 printf(__('Last edited by %1$s on %2$s at %3$s'), wp_specialchars( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); 148 } else { 149 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)); 150 } 151 ?> 146 152 <br class="clear" /> 147 153 <?php endif; ?> -
trunk/wp-admin/includes/comment.php
r7130 r7338 21 21 $_POST['comment_content'] = $_POST['content']; 22 22 $_POST['comment_ID'] = (int) $_POST['comment_ID']; 23 24 foreach ( array ('aa', 'mm', 'jj', 'hh', 'mm') as $timeunit ) { 25 if ( !empty( $_POST['hidden_' . $timeunit] ) && $_POST['hidden_' . $timeunit] != $_POST[$timeunit] ) { 26 $_POST['edit_date'] = '1'; 27 break; 28 } 29 } 30 23 31 24 32 if (!empty ( $_POST['edit_date'] ) ) { -
trunk/wp-admin/includes/post.php
r7320 r7338 74 74 if (!isset( $_POST['ping_status'] )) 75 75 $_POST['ping_status'] = 'closed'; 76 77 foreach ( array ('aa', 'mm', 'jj', 'hh', 'mm') as $timeunit ) { 78 if ( !empty( $_POST['hidden_' . $timeunit] ) && $_POST['hidden_' . $timeunit] != $_POST[$timeunit] ) { 79 $_POST['edit_date'] = '1'; 80 break; 81 } 82 } 76 83 77 84 if (!empty ( $_POST['edit_date'] ) ) { … … 282 289 $_POST['ping_status'] = 'closed'; 283 290 291 foreach ( array ('aa', 'mm', 'jj', 'hh', 'mm') as $timeunit ) { 292 if ( !empty( $_POST['hidden_' . $timeunit] ) && $_POST['hidden_' . $timeunit] != $_POST[$timeunit] ) { 293 $_POST['edit_date'] = '1'; 294 break; 295 } 296 } 297 284 298 if (!empty ( $_POST['edit_date'] ) ) { 285 299 $aa = $_POST['aa']; -
trunk/wp-admin/includes/template.php
r7329 r7338 831 831 $tab_index_attribute = " tabindex=\"$tab_index\""; 832 832 833 echo '<label for="timestamp" style="display: block;"><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp"'.$tab_index_attribute.' /> '.__( 'Edit timestamp' ).'</label><br />';833 // echo '<label for="timestamp" style="display: block;"><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp"'.$tab_index_attribute.' /> '.__( 'Edit timestamp' ).'</label><br />'; 834 834 835 835 $time_adj = time() + (get_option( 'gmt_offset' ) * 3600 ); … … 842 842 $ss = ($edit) ? mysql2date( 's', $post_date ) : gmdate( 's', $time_adj ); 843 843 844 $month = "<select name=\"mm\" onchange=\"edit_date.checked=true\"$tab_index_attribute>\n";844 $month = "<select id=\"mm\" name=\"mm\" onchange=\"edit_date.checked=true\"$tab_index_attribute>\n"; 845 845 for ( $i = 1; $i < 13; $i = $i +1 ) { 846 $month .= "\t\t\t <option value=\"$i\"";846 $month .= "\t\t\t" . '<option value="' . zeroise($i, 2) . '"'; 847 847 if ( $i == $mm ) 848 848 $month .= ' selected="selected"'; … … 851 851 $month .= '</select>'; 852 852 853 $day = '<input type="text" id="jj" name="jj" value="' . $jj . '" size="2" maxlength="2" onchange="edit_date.checked=true"' . $tab_index_attribute . ' autocomplete="off" />'; 854 $year = '<input type="text" id="aa" name="aa" value="' . $aa . '" size="4" maxlength="5" onchange="edit_date.checked=true"' . $tab_index_attribute . ' autocomplete="off" />'; 855 $hour = '<input type="text" id="hh" name="hh" value="' . $hh . '" size="2" maxlength="2" onchange="edit_date.checked=true"' . $tab_index_attribute . ' autocomplete="off" />'; 856 $minute = '<input type="text" id="mn" name="mn" value="' . $mn . '" size="2" maxlength="2" onchange="edit_date.checked=true"' . $tab_index_attribute . ' autocomplete="off" />'; 857 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); 853 $day = '<input type="text" id="jj" name="jj" value="' . $jj . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />'; 854 $year = '<input type="text" id="aa" name="aa" value="' . $aa . '" size="4" maxlength="5"' . $tab_index_attribute . ' autocomplete="off" />'; 855 $hour = '<input type="text" id="hh" name="hh" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />'; 856 $minute = '<input type="text" id="mn" name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />'; 857 printf(_c('%1$s%2$s, %3$s <br />@ %4$s : %5$s|1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input'), $month, $day, $year, $hour, $minute); 858 echo "\n\n"; 859 foreach ( array('mm', 'jj', 'aa', 'hh', 'mn') as $timeunit ) 860 echo '<input type="hidden" id="hidden_' . $timeunit . '" name="hidden_' . $timeunit . '" value="' . $$timeunit . '" />' . "\n"; 858 861 ?> 859 <input type="hidden" id="ss" name="ss" value="<?php echo $ss ?>" size="2" maxlength="2" onchange="edit_date.checked=true" /> 862 863 <input type="hidden" id="ss" name="ss" value="<?php echo $ss ?>" size="2" maxlength="2" /> 860 864 <?php 861 865 } -
trunk/wp-admin/js/post.js
r7325 r7338 150 150 if (jQuery('#timestampdiv').is(":hidden")) { 151 151 jQuery('#timestampdiv').slideDown("normal"); 152 jQuery('.edit-timestamp').text(postL10n.cancel); 152 153 } else { 153 154 jQuery('#timestampdiv').hide(); 155 jQuery('#mm').val(jQuery('#hidden_mm').val()); 156 jQuery('#jj').val(jQuery('#hidden_jj').val()); 157 jQuery('#aa').val(jQuery('#hidden_aa').val()); 158 jQuery('#hh').val(jQuery('#hidden_hh').val()); 159 jQuery('#mn').val(jQuery('#hidden_mn').val()); 160 jQuery('.edit-timestamp').text(postL10n.edit); 154 161 } 155 162 return false; -
trunk/wp-includes/script-loader.php
r7336 r7338 148 148 'addTag' => attribute_escape(__('Add new tag')), 149 149 'separate' => __('Separate tags with commas'), 150 'cancel' => __('Cancel'), 151 'edit' => __('Edit'), 150 152 ) ); 151 153 $this->add( 'page', '/wp-admin/js/page.js', array('jquery', 'slug', 'postbox'), '20080208' );
Note: See TracChangeset
for help on using the changeset viewer.