- Timestamp:
- 01/29/2020 12:43:23 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-automatic-updater.php
r45932 r47122 142 142 } 143 143 144 // Only relax the filesystem checks when the update doesn't include new files 144 // Only relax the filesystem checks when the update doesn't include new files. 145 145 $allow_relaxed_file_ownership = false; 146 146 if ( 'core' == $type && isset( $item->new_files ) && ! $item->new_files ) { … … 284 284 case 'plugin': 285 285 $upgrader = new Plugin_Upgrader( $skin ); 286 $context = WP_PLUGIN_DIR; // We don't support custom Plugin directories, or updates for WPMU_PLUGIN_DIR 286 $context = WP_PLUGIN_DIR; // We don't support custom Plugin directories, or updates for WPMU_PLUGIN_DIR. 287 287 break; 288 288 case 'theme': … … 358 358 // Only available for core updates. 359 359 'attempt_rollback' => true, 360 // Allow relaxed file ownership in some scenarios 360 // Allow relaxed file ownership in some scenarios. 361 361 'allow_relaxed_file_ownership' => $allow_relaxed_file_ownership, 362 362 ) … … 410 410 } 411 411 412 // Don't automatically run these thin s, as we'll handle it ourselves412 // Don't automatically run these things, as we'll handle it ourselves. 413 413 remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 ); 414 414 remove_action( 'upgrader_process_complete', 'wp_version_check' ); … … 416 416 remove_action( 'upgrader_process_complete', 'wp_update_themes' ); 417 417 418 // Next, Plugins419 wp_update_plugins(); // Check for Plugin updates418 // Next, plugins. 419 wp_update_plugins(); // Check for plugin updates. 420 420 $plugin_updates = get_site_transient( 'update_plugins' ); 421 421 if ( $plugin_updates && ! empty( $plugin_updates->response ) ) { … … 423 423 $this->update( 'plugin', $plugin ); 424 424 } 425 // Force refresh of plugin update information 425 // Force refresh of plugin update information. 426 426 wp_clean_plugins_cache(); 427 427 } 428 428 429 // Next, those themes we all love 430 wp_update_themes(); // Check for Theme updates429 // Next, those themes we all love. 430 wp_update_themes(); // Check for theme updates. 431 431 $theme_updates = get_site_transient( 'update_themes' ); 432 432 if ( $theme_updates && ! empty( $theme_updates->response ) ) { … … 434 434 $this->update( 'theme', (object) $theme ); 435 435 } 436 // Force refresh of theme update information 436 // Force refresh of theme update information. 437 437 wp_clean_themes_cache(); 438 438 } 439 439 440 // Next, Process any core update441 wp_version_check(); // Check for Core updates440 // Next, process any core update. 441 wp_version_check(); // Check for core updates. 442 442 $core_update = find_core_auto_update(); 443 443 … … 446 446 } 447 447 448 // Clean up, and check for any pending translations 449 // (Core_Upgrader checks for core updates )448 // Clean up, and check for any pending translations. 449 // (Core_Upgrader checks for core updates.) 450 450 $theme_stats = array(); 451 451 if ( isset( $this->update_results['theme'] ) ) { … … 454 454 } 455 455 } 456 wp_update_themes( $theme_stats ); // Check for Theme updates456 wp_update_themes( $theme_stats ); // Check for theme updates. 457 457 458 458 $plugin_stats = array(); … … 462 462 } 463 463 } 464 wp_update_plugins( $plugin_stats ); // Check for Plugin updates465 466 // Finally, Process any new translations464 wp_update_plugins( $plugin_stats ); // Check for plugin updates. 465 466 // Finally, process any new translations. 467 467 $language_updates = wp_get_translation_updates(); 468 468 if ( $language_updates ) { … … 471 471 } 472 472 473 // Clear existing caches 473 // Clear existing caches. 474 474 wp_clean_update_cache(); 475 475 476 wp_version_check(); // check for Core updates477 wp_update_themes(); // Check for Theme updates478 wp_update_plugins(); // Check for Plugin updates476 wp_version_check(); // Check for core updates. 477 wp_update_themes(); // Check for theme updates. 478 wp_update_plugins(); // Check for plugin updates. 479 479 } 480 480 … … 627 627 628 628 $next_user_core_update = get_preferred_from_update_core(); 629 // If the update transient is empty, use the update we just performed 629 // If the update transient is empty, use the update we just performed. 630 630 if ( ! $next_user_core_update ) { 631 631 $next_user_core_update = $core_update; … … 861 861 $body[] = sprintf( __( 'WordPress site: %s' ), network_home_url( '/' ) ); 862 862 863 // Core 863 // Core. 864 864 if ( isset( $this->update_results['core'] ) ) { 865 865 $result = $this->update_results['core'][0]; … … 875 875 } 876 876 877 // Plugins, Themes, Translations 877 // Plugins, Themes, Translations. 878 878 foreach ( array( 'plugin', 'theme', 'translation' ) as $type ) { 879 879 if ( ! isset( $this->update_results[ $type ] ) ) { … … 895 895 } 896 896 if ( $success_items != $this->update_results[ $type ] ) { 897 // Failed updates 897 // Failed updates. 898 898 $messages = array( 899 899 'plugin' => __( 'The following plugins failed to update:' ),
Note: See TracChangeset
for help on using the changeset viewer.