Changeset 27924 for branches/3.7/src/wp-includes/update.php
- Timestamp:
- 04/03/2014 04:02:35 AM (12 years ago)
- Location:
- branches/3.7
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/update.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.7
-
branches/3.7/src/wp-includes/update.php
r26450 r27924 161 161 * @uses $wp_version Used to notify the WordPress version. 162 162 * 163 * @param array $extra_stats Extra statistics to report to the WordPress.org API. 163 164 * @return mixed Returns null if update is unsupported. Returns false if check is too soon. 164 165 */ 165 function wp_update_plugins( ) {166 function wp_update_plugins( $extra_stats = array() ) { 166 167 include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version 167 168 … … 202 203 $time_not_changed = isset( $current->last_checked ) && $timeout > ( time() - $current->last_checked ); 203 204 204 if ( $time_not_changed ) {205 if ( $time_not_changed && ! $extra_stats ) { 205 206 $plugin_changed = false; 206 207 foreach ( $plugins as $file => $p ) { … … 251 252 ); 252 253 254 if ( $plugin_update_stats ) { 255 $options['body']['update_stats'] = json_encode( $extra_stats ); 256 } 257 253 258 $url = $http_url = 'http://api.wordpress.org/plugins/update-check/1.1/'; 254 259 if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) … … 292 297 * @uses $wp_version Used to notify the WordPress version. 293 298 * 299 * @param array $extra_stats Extra statistics to report to the WordPress.org API. 294 300 * @return mixed Returns null if update is unsupported. Returns false if check is too soon. 295 301 */ 296 function wp_update_themes( ) {302 function wp_update_themes( $extra_stats = array() ) { 297 303 include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version 298 304 … … 344 350 $time_not_changed = isset( $last_update->last_checked ) && $timeout > ( time() - $last_update->last_checked ); 345 351 346 if ( $time_not_changed ) {352 if ( $time_not_changed && ! $extra_stats ) { 347 353 $theme_changed = false; 348 354 foreach ( $checked as $slug => $v ) { … … 390 396 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) 391 397 ); 398 399 if ( $theme_update_stats ) { 400 $options['body']['update_stats'] = json_encode( $extra_stats ); 401 } 392 402 393 403 $url = $http_url = 'http://api.wordpress.org/themes/update-check/1.1/';
Note: See TracChangeset
for help on using the changeset viewer.