Changeset 25872 for trunk/src/wp-admin/includes/update.php
- Timestamp:
- 10/22/2013 09:14:06 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/update.php
r25835 r25872 345 345 346 346 function maintenance_nag() { 347 include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version 347 348 global $upgrading; 348 if ( ! isset( $upgrading ) ) 349 $nag = isset( $upgrading ); 350 if ( ! $nag ) { 351 $failed = get_site_option( 'auto_core_update_failed' ); 352 /* 353 * If an update failed critically, we may have copied over version.php but not other files. 354 * In that case, if the install claims we're running the version we attempted, nag. 355 * This is serious enough to err on the side of nagging. 356 * 357 * If we simply failed to update before we tried to copy any files, then assume things are 358 * OK if they are now running the latest. 359 * 360 * This flag is cleared whenever a successful update occurs using Core_Upgrader. 361 */ 362 $comparison = ! empty( $failed['critical'] ) ? '>=' : '>'; 363 if ( version_compare( $failed['attempted'], $wp_version, '>=' ) ) 364 $nag = true; 365 } 366 367 if ( ! $nag ) 349 368 return false; 350 369 … … 357 376 } 358 377 add_action( 'admin_notices', 'maintenance_nag' ); 378 add_action( 'network_admin_notices', 'maintenance_nag' );
Note: See TracChangeset
for help on using the changeset viewer.