Changeset 47122 for trunk/src/wp-includes/update.php
- Timestamp:
- 01/29/2020 12:43:23 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/update.php (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/update.php
r45932 r47122 28 28 29 29 global $wpdb, $wp_local_package; 30 // include an unmodified $wp_version30 // Include an unmodified $wp_version. 31 31 include( ABSPATH . WPINC . '/version.php' ); 32 32 $php_version = phpversion(); … … 35 35 $translations = wp_get_installed_translations( 'core' ); 36 36 37 // Invalidate the transient when $wp_version changes 37 // Invalidate the transient when $wp_version changes. 38 38 if ( is_object( $current ) && $wp_version != $current->version_checked ) { 39 39 $current = false; … … 50 50 } 51 51 52 // Wait 60 seconds between multiple version check requests53 $timeout = 60;52 // Wait 1 minute between multiple version check requests. 53 $timeout = MINUTE_IN_SECONDS; 54 54 $time_not_changed = isset( $current->last_checked ) && $timeout > ( time() - $current->last_checked ); 55 55 if ( ! $force_check && $time_not_changed ) { … … 66 66 $locale = apply_filters( 'core_version_check_locale', get_locale() ); 67 67 68 // Update last_checked for current to prevent multiple blocking requests if request hangs 68 // Update last_checked for current to prevent multiple blocking requests if request hangs. 69 69 $current->last_checked = time(); 70 70 set_site_transient( 'update_core', $current ); … … 261 261 } 262 262 263 // include an unmodified $wp_version263 // Include an unmodified $wp_version. 264 264 include( ABSPATH . WPINC . '/version.php' ); 265 265 266 // If running blog-side, bail unless we've not checked in the last 12 hours 266 // If running blog-side, bail unless we've not checked in the last 12 hours. 267 267 if ( ! function_exists( 'get_plugins' ) ) { 268 268 require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); … … 324 324 } 325 325 326 // Bail if we've checked recently and if nothing has changed 326 // Bail if we've checked recently and if nothing has changed. 327 327 if ( ! $plugin_changed ) { 328 328 return; … … 330 330 } 331 331 332 // Update last_checked for current to prevent multiple blocking requests if request hangs 332 // Update last_checked for current to prevent multiple blocking requests if request hangs. 333 333 $current->last_checked = time(); 334 334 set_site_transient( 'update_plugins', $current ); … … 352 352 $timeout = 30; 353 353 } else { 354 // Three seconds, plus one extra second for every 10 plugins 354 // Three seconds, plus one extra second for every 10 plugins. 355 355 $timeout = 3 + (int) ( count( $plugins ) / 10 ); 356 356 } … … 441 441 } 442 442 443 // include an unmodified $wp_version443 // Include an unmodified $wp_version. 444 444 include( ABSPATH . WPINC . '/version.php' ); 445 445 … … 514 514 } 515 515 516 // Bail if we've checked recently and if nothing has changed 516 // Bail if we've checked recently and if nothing has changed. 517 517 if ( ! $theme_changed ) { 518 518 return; … … 520 520 } 521 521 522 // Update last_checked for current to prevent multiple blocking requests if request hangs 522 // Update last_checked for current to prevent multiple blocking requests if request hangs. 523 523 $last_update->last_checked = time(); 524 524 set_site_transient( 'update_themes', $last_update ); … … 542 542 $timeout = 30; 543 543 } else { 544 // Three seconds, plus one extra second for every 10 themes 544 // Three seconds, plus one extra second for every 10 themes. 545 545 $timeout = 3 + (int) ( count( $themes ) / 10 ); 546 546 } … … 729 729 */ 730 730 function _maybe_update_core() { 731 // include an unmodified $wp_version731 // Include an unmodified $wp_version. 732 732 include( ABSPATH . WPINC . '/version.php' ); 733 733
Note: See TracChangeset
for help on using the changeset viewer.