Changeset 26192 for trunk/src/wp-includes/update.php
- Timestamp:
- 11/15/2013 03:04:00 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.