Make WordPress Core


Ignore:
Timestamp:
10/07/2016 04:36:06 PM (10 years ago)
Author:
swissspidy
Message:

Upgrade/Install: Show correct time of last checked update.

Props PieWP for initial patch.
Fixes #37554.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/update-core.php

    r38736 r38743  
    590590        }
    591591
     592        $last_update_check = false;
     593        $current = get_site_transient( 'update_core' );
     594
     595        if ( $current && isset ( $current->last_checked ) )     {
     596                $last_update_check = $current->last_checked + get_option( 'gmt_offset' ) * HOUR_IN_SECONDS;
     597        }
     598
    592599        echo '<p>';
    593600        /* translators: %1 date, %2 time. */
    594         printf( __( 'Last checked on %1$s at %2$s.' ), date_i18n( __( 'F j, Y' ) ), date_i18n( __( 'g:i a' ) ) );
     601        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 ) );
    595602        echo ' &nbsp; <a class="button" href="' . esc_url( self_admin_url('update-core.php?force-check=1') ) . '">' . __( 'Check Again' ) . '</a>';
    596603        echo '</p>';
Note: See TracChangeset for help on using the changeset viewer.