Changeset 25750 for trunk/src/wp-includes/update.php
- Timestamp:
- 10/10/2013 01:31:22 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/update.php
r25699 r25750 18 18 * @uses $wp_version Used to check against the newest WordPress version. 19 19 * 20 * @param array $extra_stats Extra statistics to report to the WordPress.org API. 20 21 * @return mixed Returns null if update is unsupported. Returns false if check is too soon. 21 22 */ 22 function wp_version_check( ) {23 function wp_version_check( $extra_stats = array() ) { 23 24 if ( defined('WP_INSTALLING') ) 24 25 return; … … 40 41 $timeout = 60; 41 42 $time_not_changed = isset( $current->last_checked ) && $timeout > ( time() - $current->last_checked ); 42 if ( $time_not_changed )43 if ( $time_not_changed && empty( $extra_args ) ) 43 44 return false; 44 45 … … 83 84 'blogs' => $num_blogs, 84 85 'users' => $user_count, 85 'multisite_enabled' => $multisite_enabled 86 'multisite_enabled' => $multisite_enabled, 86 87 ); 88 89 if ( $extra_stats ) 90 $query = array_merge( $query, $extra_stats ); 87 91 88 92 $url = 'http://api.wordpress.org/core/version-check/1.7/?' . http_build_query( $query, null, '&' ); … … 543 547 add_action( 'admin_init', '_maybe_update_core' ); 544 548 add_action( 'wp_version_check', 'wp_version_check' ); 545 add_action( 'upgrader_process_complete', 'wp_version_check' );549 add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 ); 546 550 547 551 add_action( 'load-plugins.php', 'wp_update_plugins' );
Note: See TracChangeset
for help on using the changeset viewer.