Changeset 21996 for trunk/wp-includes/update.php
- Timestamp:
- 09/25/2012 05:26:19 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/update.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/update.php
r21874 r21996 156 156 switch ( current_filter() ) { 157 157 case 'load-update-core.php' : 158 $timeout = 60; // 1 min158 $timeout = MINUTE_IN_SECONDS; 159 159 break; 160 160 case 'load-plugins.php' : 161 161 case 'load-update.php' : 162 $timeout = 3600; // 1 hour162 $timeout = HOUR_IN_SECONDS; 163 163 break; 164 164 default : 165 $timeout = 43200; // 12 hours165 $timeout = 12 * HOUR_IN_SECONDS; 166 166 } 167 167 … … 265 265 switch ( current_filter() ) { 266 266 case 'load-update-core.php' : 267 $timeout = 60; // 1 min267 $timeout = MINUTE_IN_SECONDS; 268 268 break; 269 269 case 'load-themes.php' : 270 270 case 'load-update.php' : 271 $timeout = 3600; // 1 hour271 $timeout = HOUR_IN_SECONDS; 272 272 break; 273 273 default : 274 $timeout = 43200; // 12 hours274 $timeout = 12 * HOUR_IN_SECONDS; 275 275 } 276 276 … … 372 372 373 373 if ( isset( $current->last_checked ) && 374 43200> ( time() - $current->last_checked ) &&374 12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) && 375 375 isset( $current->version_checked ) && 376 376 $current->version_checked == $wp_version ) … … 391 391 function _maybe_update_plugins() { 392 392 $current = get_site_transient( 'update_plugins' ); 393 if ( isset( $current->last_checked ) && 43200> ( time() - $current->last_checked ) )393 if ( isset( $current->last_checked ) && 12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) ) 394 394 return; 395 395 wp_update_plugins(); … … 407 407 function _maybe_update_themes( ) { 408 408 $current = get_site_transient( 'update_themes' ); 409 if ( isset( $current->last_checked ) && 43200> ( time( ) - $current->last_checked ) )409 if ( isset( $current->last_checked ) && 12 * HOUR_IN_SECONDS > ( time( ) - $current->last_checked ) ) 410 410 return; 411 411
Note: See TracChangeset
for help on using the changeset viewer.