WordPress.org

Make WordPress Core

Ticket #9730: 9730-wp-admin.diff

File 9730-wp-admin.diff, 4.7 KB (added by Denis-de-Bernardy, 6 years ago)

wp-admin area

  • wp-admin/includes/upgrade.php

     
    685685                $posts = $wpdb->get_results("SELECT ID, post_date FROM $wpdb->posts WHERE post_status ='future'"); 
    686686                if ( !empty($posts) ) 
    687687                        foreach ( $posts as $post ) 
    688                                 wp_schedule_single_event(mysql2date('U', $post->post_date), 'publish_future_post', array($post->ID)); 
     688                                wp_schedule_single_event(mysql2date('U', $post->post_date, false), 'publish_future_post', array($post->ID)); 
    689689        } 
    690690} 
    691691 
  • wp-admin/includes/template.php

     
    12981298        <div class="comment_status">' . $post->comment_status . '</div> 
    12991299        <div class="ping_status">' . $post->ping_status . '</div> 
    13001300        <div class="_status">' . $post->post_status . '</div> 
    1301         <div class="jj">' . mysql2date( 'd', $post->post_date ) . '</div> 
    1302         <div class="mm">' . mysql2date( 'm', $post->post_date ) . '</div> 
    1303         <div class="aa">' . mysql2date( 'Y', $post->post_date ) . '</div> 
    1304         <div class="hh">' . mysql2date( 'H', $post->post_date ) . '</div> 
    1305         <div class="mn">' . mysql2date( 'i', $post->post_date ) . '</div> 
    1306         <div class="ss">' . mysql2date( 's', $post->post_date ) . '</div> 
     1301        <div class="jj">' . mysql2date( 'd', $post->post_date, false ) . '</div> 
     1302        <div class="mm">' . mysql2date( 'm', $post->post_date, false ) . '</div> 
     1303        <div class="aa">' . mysql2date( 'Y', $post->post_date, false ) . '</div> 
     1304        <div class="hh">' . mysql2date( 'H', $post->post_date, false ) . '</div> 
     1305        <div class="mn">' . mysql2date( 'i', $post->post_date, false ) . '</div> 
     1306        <div class="ss">' . mysql2date( 's', $post->post_date, false ) . '</div> 
    13071307        <div class="post_password">' . wp_specialchars($post->post_password, 1) . '</div>'; 
    13081308 
    13091309        if( $post->post_type == 'page' ) 
     
    25322532 
    25332533        $time_adj = time() + (get_option( 'gmt_offset' ) * 3600 ); 
    25342534        $post_date = ($for_post) ? $post->post_date : $comment->comment_date; 
    2535         $jj = ($edit) ? mysql2date( 'd', $post_date ) : gmdate( 'd', $time_adj ); 
    2536         $mm = ($edit) ? mysql2date( 'm', $post_date ) : gmdate( 'm', $time_adj ); 
    2537         $aa = ($edit) ? mysql2date( 'Y', $post_date ) : gmdate( 'Y', $time_adj ); 
    2538         $hh = ($edit) ? mysql2date( 'H', $post_date ) : gmdate( 'H', $time_adj ); 
    2539         $mn = ($edit) ? mysql2date( 'i', $post_date ) : gmdate( 'i', $time_adj ); 
    2540         $ss = ($edit) ? mysql2date( 's', $post_date ) : gmdate( 's', $time_adj ); 
     2535        $jj = ($edit) ? mysql2date( 'd', $post_date, false ) : gmdate( 'd', $time_adj ); 
     2536        $mm = ($edit) ? mysql2date( 'm', $post_date, false ) : gmdate( 'm', $time_adj ); 
     2537        $aa = ($edit) ? mysql2date( 'Y', $post_date, false ) : gmdate( 'Y', $time_adj ); 
     2538        $hh = ($edit) ? mysql2date( 'H', $post_date, false ) : gmdate( 'H', $time_adj ); 
     2539        $mn = ($edit) ? mysql2date( 'i', $post_date, false ) : gmdate( 'i', $time_adj ); 
     2540        $ss = ($edit) ? mysql2date( 's', $post_date, false ) : gmdate( 's', $time_adj ); 
    25412541 
    25422542        $cur_jj = gmdate( 'd', $time_adj ); 
    25432543        $cur_mm = gmdate( 'm', $time_adj ); 
  • wp-admin/edit-page-form.php

     
    4141        $nonce_action = 'update-page_' . $post_ID; 
    4242        $form_extra = "<input type='hidden' id='post_ID' name='post_ID' value='$post_ID' />"; 
    4343        $autosave = wp_get_post_autosave( $post_ID ); 
    44         if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt ) > mysql2date( 'U', $post->post_modified_gmt ) ) 
     44        if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) 
    4545                $notice = sprintf( $notices[1], get_edit_post_link( $autosave->ID ) ); 
    4646} 
    4747 
  • wp-admin/edit-form-advanced.php

     
    4141        $autosave = wp_get_post_autosave( $post_ID ); 
    4242 
    4343        // Detect if there exists an autosave newer than the post and if that autosave is different than the post 
    44         if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt ) > mysql2date( 'U', $post->post_modified_gmt ) ) { 
     44        if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) { 
    4545                foreach ( _wp_post_revision_fields() as $autosave_field => $_autosave_field ) { 
    4646                        if ( normalize_whitespace( $autosave->$autosave_field ) != normalize_whitespace( $post->$autosave_field ) ) { 
    4747                                $notice = sprintf( $notices[1], get_edit_post_link( $autosave->ID ) );