Changeset 44809
- Timestamp:
- 03/07/2019 09:11:37 AM (6 years ago)
- Location:
- trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r44785 r44809 1465 1465 $post_data['post_type'] = $post->post_type; 1466 1466 $post_data['post_status'] = 'draft'; 1467 $now = current_time( 'timestamp', 1);1467 $now = time(); 1468 1468 /* translators: 1: Post creation date, 2: Post creation time */ 1469 1469 $post_data['post_title'] = sprintf( __( 'Draft created on %1$s at %2$s' ), date( __( 'F j, Y' ), $now ), date( __( 'g:i a' ), $now ) ); -
trunk/src/wp-admin/includes/dashboard.php
r44759 r44809 859 859 echo '<ul>'; 860 860 861 $today = date( 'Y-m-d', current_time( 'timestamp' ) ); 862 $tomorrow = date( 'Y-m-d', strtotime( '+1 day', current_time( 'timestamp' ) ) ); 861 $today = current_time( 'Y-m-d' ); 862 $tomorrow = gmdate( 'Y-m-d', strtotime( '+1 day', current_time( 'timestamp' ) ) ); 863 $year = current_time( 'Y' ); 863 864 864 865 while ( $posts->have_posts() ) { … … 870 871 } elseif ( date( 'Y-m-d', $time ) == $tomorrow ) { 871 872 $relative = __( 'Tomorrow' ); 872 } elseif ( date( 'Y', $time ) !== date( 'Y', current_time( 'timestamp' ) )) {873 } elseif ( date( 'Y', $time ) !== $year ) { 873 874 /* translators: date and time format for recent posts on the dashboard, from a different calendar year, see https://secure.php.net/date */ 874 875 $relative = date_i18n( __( 'M jS Y' ), $time ); -
trunk/src/wp-admin/includes/template.php
r44759 r44809 775 775 // 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 />'; 776 776 777 $time_adj = current_time( 'timestamp' );778 777 $post_date = ( $for_post ) ? $post->post_date : get_comment()->comment_date; 779 $jj = ( $edit ) ? mysql2date( 'd', $post_date, false ) : gmdate( 'd', $time_adj);780 $mm = ( $edit ) ? mysql2date( 'm', $post_date, false ) : gmdate( 'm', $time_adj);781 $aa = ( $edit ) ? mysql2date( 'Y', $post_date, false ) : gmdate( 'Y', $time_adj);782 $hh = ( $edit ) ? mysql2date( 'H', $post_date, false ) : gmdate( 'H', $time_adj);783 $mn = ( $edit ) ? mysql2date( 'i', $post_date, false ) : gmdate( 'i', $time_adj);784 $ss = ( $edit ) ? mysql2date( 's', $post_date, false ) : gmdate( 's', $time_adj);785 786 $cur_jj = gmdate( 'd', $time_adj);787 $cur_mm = gmdate( 'm', $time_adj);788 $cur_aa = gmdate( 'Y', $time_adj);789 $cur_hh = gmdate( 'H', $time_adj);790 $cur_mn = gmdate( 'i', $time_adj);778 $jj = ( $edit ) ? mysql2date( 'd', $post_date, false ) : current_time( 'd' ); 779 $mm = ( $edit ) ? mysql2date( 'm', $post_date, false ) : current_time( 'm' ); 780 $aa = ( $edit ) ? mysql2date( 'Y', $post_date, false ) : current_time( 'Y' ); 781 $hh = ( $edit ) ? mysql2date( 'H', $post_date, false ) : current_time( 'H' ); 782 $mn = ( $edit ) ? mysql2date( 'i', $post_date, false ) : current_time( 'i' ); 783 $ss = ( $edit ) ? mysql2date( 's', $post_date, false ) : current_time( 's' ); 784 785 $cur_jj = current_time( 'd' ); 786 $cur_mm = current_time( 'm' ); 787 $cur_aa = current_time( 'Y' ); 788 $cur_hh = current_time( 'H' ); 789 $cur_mn = current_time( 'i' ); 791 790 792 791 $month = '<label><span class="screen-reader-text">' . __( 'Month' ) . '</span><select ' . ( $multi ? '' : 'id="mm" ' ) . 'name="mm"' . $tab_index_attribute . ">\n"; -
trunk/src/wp-admin/includes/user.php
r44775 r44809 1393 1393 } 1394 1394 1395 $time_diff = current_time( 'timestamp', true) - $timestamp;1395 $time_diff = time() - $timestamp; 1396 1396 1397 1397 if ( $time_diff >= 0 && $time_diff < DAY_IN_SECONDS ) { -
trunk/src/wp-includes/general-template.php
r44725 r44809 2006 2006 // week_begins = 0 stands for Sunday 2007 2007 $week_begins = (int) get_option( 'start_of_week' ); 2008 $ts = current_time( 'timestamp' );2009 2008 2010 2009 // Let's figure out when we are … … 2026 2025 } 2027 2026 } else { 2028 $thisyear = gmdate( 'Y', $ts);2029 $thismonth = gmdate( 'm', $ts);2027 $thisyear = current_time( 'Y' ); 2028 $thismonth = current_time( 'm' ); 2030 2029 } 2031 2030 … … 2137 2136 $newrow = false; 2138 2137 2139 if ( $day == gmdate( 'j', $ts) &&2140 $thismonth == gmdate( 'm', $ts) &&2141 $thisyear == gmdate( 'Y', $ts) ) {2138 if ( $day == current_time( 'j' ) && 2139 $thismonth == current_time( 'm' ) && 2140 $thisyear == current_time( 'Y' ) ) { 2142 2141 $calendar_output .= '<td id="today">'; 2143 2142 } else { -
trunk/src/wp-includes/link-template.php
r44591 r44809 471 471 global $wp_rewrite; 472 472 if ( ! $year ) { 473 $year = gmdate( 'Y', current_time( 'timestamp' ));473 $year = current_time( 'Y' ); 474 474 } 475 475 $yearlink = $wp_rewrite->get_year_permastruct(); … … 506 506 global $wp_rewrite; 507 507 if ( ! $year ) { 508 $year = gmdate( 'Y', current_time( 'timestamp' ));508 $year = current_time( 'Y' ); 509 509 } 510 510 if ( ! $month ) { 511 $month = gmdate( 'm', current_time( 'timestamp' ));511 $month = current_time( 'm' ); 512 512 } 513 513 $monthlink = $wp_rewrite->get_month_permastruct(); … … 547 547 global $wp_rewrite; 548 548 if ( ! $year ) { 549 $year = gmdate( 'Y', current_time( 'timestamp' ));549 $year = current_time( 'Y' ); 550 550 } 551 551 if ( ! $month ) { 552 $month = gmdate( 'm', current_time( 'timestamp' ));552 $month = current_time( 'm' ); 553 553 } 554 554 if ( ! $day ) { 555 $day = gmdate( 'j', current_time( 'timestamp' ));555 $day = current_time( 'j' ); 556 556 } 557 557 -
trunk/src/wp-includes/ms-functions.php
r44469 r44809 519 519 if ( $signup != null ) { 520 520 $registered_at = mysql2date( 'U', $signup->registered ); 521 $now = current_time( 'timestamp', true);521 $now = time(); 522 522 $diff = $now - $registered_at; 523 523 // If registered more than two days ago, cancel registration and let this signup go through. … … 531 531 $signup = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->signups WHERE user_email = %s", $user_email ) ); 532 532 if ( $signup != null ) { 533 $diff = current_time( 'timestamp', true) - mysql2date( 'U', $signup->registered );533 $diff = time() - mysql2date( 'U', $signup->registered ); 534 534 // If registered more than two days ago, cancel registration and let this signup go through. 535 535 if ( $diff > 2 * DAY_IN_SECONDS ) { … … 689 689 $signup = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->signups WHERE domain = %s AND path = %s", $mydomain, $path ) ); // TODO: Check email too? 690 690 if ( ! empty( $signup ) ) { 691 $diff = current_time( 'timestamp', true) - mysql2date( 'U', $signup->registered );691 $diff = time() - mysql2date( 'U', $signup->registered ); 692 692 // If registered more than two days ago, cancel registration and let this signup go through. 693 693 if ( $diff > 2 * DAY_IN_SECONDS ) {
Note: See TracChangeset
for help on using the changeset viewer.