Changeset 27905 for trunk/src/wp-includes/update.php
- Timestamp:
- 04/02/2014 01:04:30 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/update.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/update.php
r27369 r27905 167 167 * @uses $wp_version Used to notify the WordPress version. 168 168 * 169 * @param array $extra_stats Extra statistics to report to the WordPress.org API. 169 170 * @return mixed Returns null if update is unsupported. Returns false if check is too soon. 170 171 */ 171 function wp_update_plugins( ) {172 function wp_update_plugins( $extra_stats = array() ) { 172 173 include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version 173 174 … … 208 209 $time_not_changed = isset( $current->last_checked ) && $timeout > ( time() - $current->last_checked ); 209 210 210 if ( $time_not_changed ) {211 if ( $time_not_changed && ! $extra_stats ) { 211 212 $plugin_changed = false; 212 213 foreach ( $plugins as $file => $p ) { … … 257 258 ); 258 259 260 if ( $plugin_update_stats ) { 261 $options['body']['update_stats'] = json_encode( $extra_stats ); 262 } 263 259 264 $url = $http_url = 'http://api.wordpress.org/plugins/update-check/1.1/'; 260 265 if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) … … 297 302 * @uses $wp_version Used to notify the WordPress version. 298 303 * 304 * @param array $extra_stats Extra statistics to report to the WordPress.org API. 299 305 * @return mixed Returns null if update is unsupported. Returns false if check is too soon. 300 306 */ 301 function wp_update_themes( ) {307 function wp_update_themes( $extra_stats = array() ) { 302 308 include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version 303 309 … … 349 355 $time_not_changed = isset( $last_update->last_checked ) && $timeout > ( time() - $last_update->last_checked ); 350 356 351 if ( $time_not_changed ) {357 if ( $time_not_changed && ! $extra_stats ) { 352 358 $theme_changed = false; 353 359 foreach ( $checked as $slug => $v ) { … … 395 401 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) 396 402 ); 403 404 if ( $theme_update_stats ) { 405 $options['body']['update_stats'] = json_encode( $extra_stats ); 406 } 397 407 398 408 $url = $http_url = 'http://api.wordpress.org/themes/update-check/1.1/';
Note: See TracChangeset
for help on using the changeset viewer.