Changeset 6904
- Timestamp:
- 02/18/08 22:07:57 (9 months ago)
- Files:
-
- trunk/wp-admin/edit-form-advanced.php (modified) (2 diffs)
- trunk/wp-admin/edit-page-form.php (modified) (1 diff)
- trunk/wp-admin/includes/template.php (modified) (2 diffs)
- trunk/wp-admin/js/page.js (modified) (1 diff)
- trunk/wp-admin/js/post.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/edit-form-advanced.php
r6901 r6904 128 128 <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 post private') ?></label></p> 129 129 <?php 130 if ($post_ID): 131 132 if ( 'future' == $post->post_status ) { 133 $time = __('Scheduled for:<br />%1$s at %2$s'); 134 $date = $post->post_date; 135 } else if ( 'publish' == $post->post_status ) { 136 $time = __('Published on:<br />%1$s at %2$s'); 137 $date = $post->post_date; 130 if ($post_ID) { 131 132 if ( 'future' == $post->post_status ) { 133 $stamp = __('Scheduled for:<br />%1$s at %2$s'); 134 } else if ( 'publish' == $post->post_status ) { 135 $stamp = __('Published on:<br />%1$s at %2$s'); 136 } else { 137 $stamp = __('Saved on:<br />%1$s at %2$s'); 138 } 139 140 $date = mysql2date(get_option('date_format'), $post->post_date); 141 $time = mysql2date(get_option('time_format'), $post->post_date); 138 142 } else { 139 $time = __('Saved on:<br />%1$s at %2$s'); 140 $date = $post->post_modified; 141 } 142 143 ?> 144 <p><?php printf($time, mysql2date(get_option('date_format'), $date), mysql2date(get_option('time_format'), $date)); ?> 145 <?php endif; ?> 143 $stamp = __('Timestamp:<br />%1$s at %2$s'); 144 $date = mysql2date(get_option('date_format'), current_time('mysql')); 145 $time = mysql2date(get_option('time_format'), current_time('mysql')); 146 } 147 ?> 148 <p><?php printf($stamp, $date, $time); ?> 149 <a href="#edit_timestamp" class="edit-timestamp"><?php _e('Edit') ?></a></p> 150 151 <div id='timestamp'><?php touch_time(($action == 'edit')); ?></div> 152 146 153 </div> 147 154 … … 317 324 </div> 318 325 319 <?php if ( current_user_can('edit_posts') ) : ?>320 <div id="posttimestampdiv" class="postbox <?php echo postbox_classes('posttimestampdiv', 'post'); ?>">321 <h3><?php _e('Post Timestamp'); ?></h3>322 <div class="inside"><?php touch_time(($action == 'edit')); ?></div>323 </div>324 <?php endif; ?>325 326 326 <?php 327 327 $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM trunk/wp-admin/edit-page-form.php
r6901 r6904 92 92 <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 post private') ?></label></p> 93 93 <?php 94 if ($post_ID): 95 96 if ( 'future' == $post->post_status ) { 97 $time = __('Scheduled for:<br />%1$s at %2$s'); 98 $date = $post->post_date; 99 } else if ( 'publish' == $post->post_status ) { 100 $time = __('Published on:<br />%1$s at %2$s'); 101 $date = $post->post_date; 94 95 if ($post_ID) { 96 97 if ( 'future' == $post->post_status ) { 98 $stamp = __('Scheduled for:<br />%1$s at %2$s'); 99 } else if ( 'publish' == $post->post_status ) { 100 $stamp = __('Published on:<br />%1$s at %2$s'); 101 } else { 102 $stamp = __('Saved on:<br />%1$s at %2$s'); 103 } 104 105 $date = mysql2date(get_option('date_format'), $post->post_date); 106 $time = mysql2date(get_option('time_format'), $post->post_date); 102 107 } else { 103 $time = __('Saved on:<br />%1$s at %2$s'); 104 $date = $post->post_modified; 105 } 106 107 ?> 108 <p><?php printf($time, mysql2date(get_option('date_format'), $date), mysql2date(get_option('time_format'), $date)); ?> 109 <?php endif; ?> 108 $stamp = __('Timestamp:<br />%1$s at %2$s'); 109 $date = mysql2date(get_option('date_format'), current_time('mysql')); 110 $time = mysql2date(get_option('time_format'), current_time('mysql')); 111 } 112 ?> 113 <p><?php printf($stamp, $date, $time); ?> 114 <a href="#edit_timestamp" class="edit-timestamp"><?php _e('Edit') ?></a></p> 115 116 <div id='timestamp'><?php touch_time(($action == 'edit')); ?></div> 117 110 118 </div> 111 119 trunk/wp-admin/includes/template.php
r6875 r6904 755 755 $tab_index_attribute = " tabindex=\"$tab_index\""; 756 756 757 echo '< fieldset><legend><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp"'.$tab_index_attribute.' /> <label for="timestamp">'.__( 'Edit timestamp' ).'</label></legend>';757 echo '<legend><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp"'.$tab_index_attribute.' /> <label for="timestamp">'.__( 'Edit timestamp' ).'</label></legend>'; 758 758 759 759 $time_adj = time() + (get_option( 'gmt_offset' ) * 3600 ); … … 781 781 <input type="hidden" id="ss" name="ss" value="<?php echo $ss ?>" size="2" maxlength="2" onchange="edit_date.checked=true" /> 782 782 <?php 783 if ( $edit ) {784 printf( _c( 'Existing timestamp: %1$s %2$s, %3$s @ %4$s:%5$s|1: month, 2: month string, 3: full year, 4: hours, 5: minutes' ), $wp_locale->get_month( $mm ), $jj, $aa, $hh, $mn );785 }786 ?>787 </fieldset>788 <?php789 790 783 } 791 784 trunk/wp-admin/js/page.js
r6761 r6904 2 2 add_postbox_toggles('page'); 3 3 make_slugedit_clickable(); 4 5 jQuery('#timestamp').css('display', 'none'); 6 jQuery('.edit-timestamp').click(function () { 7 if (jQuery('#timestamp').is(":hidden")) { 8 jQuery('#timestamp').slideDown("normal"); 9 } else { 10 jQuery('#timestamp').hide(); 11 } 12 }); 4 13 }); 5 14 trunk/wp-admin/js/post.js
r6834 r6904 141 141 } ); 142 142 jQuery('.categorychecklist :checkbox').change( syncChecks ).filter( ':checked' ).change(); 143 144 jQuery('#timestamp').css('display', 'none'); 145 jQuery('.edit-timestamp').click(function () { 146 if (jQuery('#timestamp').is(":hidden")) { 147 jQuery('#timestamp').slideDown("normal"); 148 } else { 149 jQuery('#timestamp').hide(); 150 } 151 }); 143 152 });
