Changeset 2429 for trunk/wp-admin/admin-functions.php
- Timestamp:
- 03/10/2005 09:50:26 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/admin-functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r2405 r2429 410 410 } 411 411 412 function touch_time($edit = 1) { 413 global $month, $postdata; 414 // echo $postdata['Date']; 415 if ('draft' == $postdata->post_status) { 412 function touch_time($edit = 1, $for_post = 1) { 413 global $month, $postdata, $commentdata; 414 if ( $for_post && ('draft' == $postdata->post_status) ) { 416 415 $checked = 'checked="checked" '; 417 416 $edit = false; … … 423 422 424 423 $time_adj = time() + (get_settings('gmt_offset') * 3600); 425 $post_date = $postdata->post_date;424 $post_date = ($for_post) ? $postdata->post_date : $commentdata['comment_date']; 426 425 $jj = ($edit) ? mysql2date('d', $post_date) : gmdate('d', $time_adj); 427 426 $mm = ($edit) ? mysql2date('m', $post_date) : gmdate('m', $time_adj); … … 450 449 <input type="text" name="hh" value="<?php echo $hh ?>" size="2" maxlength="2" /> : 451 450 <input type="text" name="mn" value="<?php echo $mn ?>" size="2" maxlength="2" /> 452 <input type="hidden" name="ss" value="<?php echo $ss ?>" size="2" maxlength="2" /> <?php _e('Existing timestamp'); ?>: <?php echo "{$month[$mm]} $jj, $aa @ $hh:$mn"; ?></fieldset> 451 <input type="hidden" name="ss" value="<?php echo $ss ?>" size="2" maxlength="2" /> 452 <?php _e('Existing timestamp'); ?>: 453 <?php 454 // We might need to readjust to display proper existing timestamp 455 if ( $for_post && ('draft' == $postdata->post_status) ) { 456 $jj = mysql2date('d', $post_date); 457 $mm = mysql2date('m', $post_date); 458 $aa = mysql2date('Y', $post_date); 459 $hh = mysql2date('H', $post_date); 460 $mn = mysql2date('i', $post_date); 461 $ss = mysql2date('s', $post_date); 462 } 463 echo "{$month[$mm]} $jj, $aa @ $hh:$mn"; ?> 464 </fieldset> 453 465 <?php 454 466 }
Note: See TracChangeset
for help on using the changeset viewer.