Make WordPress Core

Ticket #37554: 37554.2.diff

File 37554.2.diff, 956 bytes (added by swissspidy, 8 years ago)
  • src/wp-admin/update-core.php

    diff --git src/wp-admin/update-core.php src/wp-admin/update-core.php
    index f2328eb..73ca1fb 100644
    if ( 'upgrade-core' == $action ) { 
    592592                echo '</p></div>';
    593593        }
    594594
     595        $last_update_check = false;
     596        $current = get_site_transient( 'update_core' );
     597
     598        if ( $current && isset ( $current->last_checked ) )     {
     599                $last_update_check = $current->last_checked + get_option( 'gmt_offset' ) * HOUR_IN_SECONDS;
     600        }
     601
    595602        echo '<p>';
    596603        /* translators: %1 date, %2 time. */
    597         printf( __( 'Last checked on %1$s at %2$s.' ), date_i18n( __( 'F j, Y' ) ), date_i18n( __( 'g:i a' ) ) );
     604        printf( __( 'Last checked on %1$s at %2$s.' ), date_i18n( __( 'F j, Y' ), $last_update_check ), date_i18n( __( 'g:i a' ), $last_update_check ) );
    598605        echo ' &nbsp; <a class="button" href="' . esc_url( self_admin_url('update-core.php?force-check=1') ) . '">' . __( 'Check Again' ) . '</a>';
    599606        echo '</p>';
    600607