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

Props PieWP for initial patch.
Fixes #37554.
Built from https://develop.svn.wordpress.org/trunk@38743


git-svn-id: http://core.svn.wordpress.org/trunk@38686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Pascal Birchler 2016-10-07 16:37:31 +00:00
parent 2f52e4db9b
commit d7c994d1bf
2 changed files with 9 additions and 2 deletions

View File

@ -589,9 +589,16 @@ if ( 'upgrade-core' == $action ) {
echo '</p></div>';
}
$last_update_check = false;
$current = get_site_transient( 'update_core' );
if ( $current && isset ( $current->last_checked ) ) {
$last_update_check = $current->last_checked + get_option( 'gmt_offset' ) * HOUR_IN_SECONDS;
}
echo '<p>';
/* translators: %1 date, %2 time. */
printf( __( 'Last checked on %1$s at %2$s.' ), date_i18n( __( 'F j, Y' ) ), date_i18n( __( 'g:i a' ) ) );
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 ) );
echo ' &nbsp; <a class="button" href="' . esc_url( self_admin_url('update-core.php?force-check=1') ) . '">' . __( 'Check Again' ) . '</a>';
echo '</p>';

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38742';
$wp_version = '4.7-alpha-38743';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.