Changeset 1215 for trunk/wp-includes/functions.php
- Timestamp:
- 04/30/2004 08:56:49 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r1206 r1215 435 435 $cat_name = $cache_catnames[$cat_ID]; 436 436 return $cat_name; 437 }438 439 function touch_time($edit = 1) {440 global $month, $postdata;441 // echo $postdata['Date'];442 if ('draft' == $postdata['post_status']) {443 $checked = 'checked="checked" ';444 $edit = false;445 } else {446 $checked = ' ';447 }448 449 echo '<p><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp" '.$checked.'/> <label for="timestamp">' . __('Edit timestamp') . '</label> <a href="http://wordpress.org/docs/reference/post/#edit_timestamp" title="' . __('Help on changing the timestamp') . '">?</a><br />';450 451 $time_adj = time() + (get_settings('gmt_offset') * 3600);452 $post_date = $postdata['Date'];453 $jj = ($edit) ? mysql2date('d', $post_date) : gmdate('d', $time_adj);454 $mm = ($edit) ? mysql2date('m', $post_date) : gmdate('m', $time_adj);455 $aa = ($edit) ? mysql2date('Y', $post_date) : gmdate('Y', $time_adj);456 $hh = ($edit) ? mysql2date('H', $post_date) : gmdate('H', $time_adj);457 $mn = ($edit) ? mysql2date('i', $post_date) : gmdate('i', $time_adj);458 $ss = ($edit) ? mysql2date('s', $post_date) : gmdate('s', $time_adj);459 460 echo '<input type="text" name="jj" value="'.$jj.'" size="2" maxlength="2" />'."\n";461 echo "<select name=\"mm\">\n";462 for ($i=1; $i < 13; $i=$i+1) {463 echo "\t\t\t<option value=\"$i\"";464 if ($i == $mm)465 echo " selected='selected'";466 if ($i < 10) {467 $ii = "0".$i;468 } else {469 $ii = "$i";470 }471 echo ">".$month["$ii"]."</option>\n";472 } ?>473 </select>474 <input type="text" name="aa" value="<?php echo $aa ?>" size="4" maxlength="5" /> @475 <input type="text" name="hh" value="<?php echo $hh ?>" size="2" maxlength="2" /> :476 <input type="text" name="mn" value="<?php echo $mn ?>" size="2" maxlength="2" /> :477 <input type="text" name="ss" value="<?php echo $ss ?>" size="2" maxlength="2" /> </p>478 <?php479 437 } 480 438
Note: See TracChangeset
for help on using the changeset viewer.