Changeset 26192
- Timestamp:
- 11/15/2013 03:04:00 AM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/update-core.php
r26113 r26192 484 484 485 485 if ( 'upgrade-core' == $action ) { 486 487 wp_version_check(); 486 // Force a update check when requested 487 $force_check = ! empty( $_GET['force-check'] ); 488 wp_version_check( array(), $force_check ); 489 488 490 require_once(ABSPATH . 'wp-admin/admin-header.php'); 489 491 ?> … … 504 506 /* translators: %1 date, %2 time. */ 505 507 printf( __('Last checked on %1$s at %2$s.'), date_i18n( get_option( 'date_format' ) ), date_i18n( get_option( 'time_format' ) ) ); 506 echo ' <a class="button" href="' . esc_url( self_admin_url('update-core.php ') ) . '">' . __( 'Check Again' ) . '</a>';508 echo ' <a class="button" href="' . esc_url( self_admin_url('update-core.php?force-check=1') ) . '">' . __( 'Check Again' ) . '</a>'; 507 509 echo '</p>'; 508 510 -
trunk/src/wp-includes/update.php
r26188 r26192 19 19 * 20 20 * @param array $extra_stats Extra statistics to report to the WordPress.org API. 21 * @param bool $force_check Whether to bypass the transient cache and force a fresh update check. Defaults to false, true if $extra_stats is set. 21 22 * @return mixed Returns null if update is unsupported. Returns false if check is too soon. 22 23 */ 23 function wp_version_check( $extra_stats = array() ) {24 function wp_version_check( $extra_stats = array(), $force_check = false ) { 24 25 if ( defined('WP_INSTALLING') ) 25 26 return; … … 42 43 } 43 44 45 if ( ! empty( $extra_stats ) ) 46 $force_check = true; 47 44 48 // Wait 60 seconds between multiple version check requests 45 49 $timeout = 60; 46 50 $time_not_changed = isset( $current->last_checked ) && $timeout > ( time() - $current->last_checked ); 47 if ( $time_not_changed && empty( $extra_stats ))51 if ( ! $force_check && $time_not_changed ) 48 52 return false; 49 53 … … 95 99 ); 96 100 97 if ( $extra_stats)101 if ( is_array( $extra_stats ) ) 98 102 $post_body = array_merge( $post_body, $extra_stats ); 99 103
Note: See TracChangeset
for help on using the changeset viewer.