WordPress.org

Make WordPress Core

Ticket #10915: 10915.patch

File 10915.patch, 3.1 KB (added by hakre, 8 years ago)
  • wp-includes/general-template.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk
     
    11261126                        echo "\n\t</tr>\n\t<tr>\n\t\t";
    11271127                $newrow = false;
    11281128
    1129                 if ( $day == gmdate('j', (time() + (get_option('gmt_offset') * 3600))) && $thismonth == gmdate('m', time()+(get_option('gmt_offset') * 3600)) && $thisyear == gmdate('Y', time()+(get_option('gmt_offset') * 3600)) )
     1129                if ( $day == gmdate('j', current_time('timestamp')) && $thismonth == gmdate('m', current_time('timestamp')) && $thisyear == gmdate('Y', current_time('timestamp')) )
    11301130                        echo '<td id="today">';
    11311131                else
    11321132                        echo '<td>';
  • wp-admin/includes/template.php

     
    26102610
    26112611        // 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 />';
    26122612
    2613         $time_adj = time() + (get_option( 'gmt_offset' ) * 3600 );
     2613        $time_adj = current_time('timestamp');
    26142614        $post_date = ($for_post) ? $post->post_date : $comment->comment_date;
    26152615        $jj = ($edit) ? mysql2date( 'd', $post_date, false ) : gmdate( 'd', $time_adj );
    26162616        $mm = ($edit) ? mysql2date( 'm', $post_date, false ) : gmdate( 'm', $time_adj );
  • wp-includes/link-template.php

     
    286286function get_year_link($year) {
    287287        global $wp_rewrite;
    288288        if ( !$year )
    289                 $year = gmdate('Y', time()+(get_option('gmt_offset') * 3600));
     289                $year = gmdate('Y', current_time('timestamp'));
    290290        $yearlink = $wp_rewrite->get_year_permastruct();
    291291        if ( !empty($yearlink) ) {
    292292                $yearlink = str_replace('%year%', $year, $yearlink);
     
    308308function get_month_link($year, $month) {
    309309        global $wp_rewrite;
    310310        if ( !$year )
    311                 $year = gmdate('Y', time()+(get_option('gmt_offset') * 3600));
     311                $year = gmdate('Y', current_time('timestamp'));
    312312        if ( !$month )
    313                 $month = gmdate('m', time()+(get_option('gmt_offset') * 3600));
     313                $month = gmdate('m', current_time('timestamp'));
    314314        $monthlink = $wp_rewrite->get_month_permastruct();
    315315        if ( !empty($monthlink) ) {
    316316                $monthlink = str_replace('%year%', $year, $monthlink);
     
    334334function get_day_link($year, $month, $day) {
    335335        global $wp_rewrite;
    336336        if ( !$year )
    337                 $year = gmdate('Y', time()+(get_option('gmt_offset') * 3600));
     337                $year = gmdate('Y', current_time('timestamp'));
    338338        if ( !$month )
    339                 $month = gmdate('m', time()+(get_option('gmt_offset') * 3600));
     339                $month = gmdate('m', current_time('timestamp'));
    340340        if ( !$day )
    341                 $day = gmdate('j', time()+(get_option('gmt_offset') * 3600));
     341                $day = gmdate('j', current_time('timestamp'));
    342342
    343343        $daylink = $wp_rewrite->get_day_permastruct();
    344344        if ( !empty($daylink) ) {