Make WordPress Core

Ticket #30947: 30947.2.diff

File 30947.2.diff, 3.0 KB (added by SergeyBiryukov, 9 years ago)
  • src/wp-includes/default-filters.php

     
    354354add_action( 'init', 'create_initial_taxonomies', 0 ); // highest priority
    355355
    356356// Update
    357 add_action( 'admin_init', '_maybe_update_core' );
    358 add_action( 'wp_version_check', 'wp_version_check' );
    359 add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 );
    360 add_action( 'load-plugins.php', 'wp_update_plugins' );
    361 add_action( 'load-update.php', 'wp_update_plugins' );
    362 add_action( 'load-update-core.php', 'wp_update_plugins' );
    363 add_action( 'admin_init', '_maybe_update_plugins' );
    364 add_action( 'wp_update_plugins', 'wp_update_plugins' );
    365 add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 );
    366 add_action( 'load-themes.php', 'wp_update_themes' );
    367 add_action( 'load-update.php', 'wp_update_themes' );
    368 add_action( 'load-update-core.php', 'wp_update_themes' );
    369 add_action( 'admin_init', '_maybe_update_themes' );
    370 add_action( 'wp_update_themes', 'wp_update_themes' );
    371 add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 );
    372 add_action( 'update_option_WPLANG', 'wp_clean_update_cache' , 10, 0 );
    373 add_action( 'wp_maybe_auto_update', 'wp_maybe_auto_update' );
    374 add_action( 'init', 'wp_schedule_update_checks' );
     357if ( ( is_main_site() || is_network_admin() ) && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
     358        add_action( 'admin_init', '_maybe_update_core' );
     359        add_action( 'wp_version_check', 'wp_version_check' );
     360        add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 );
     361        add_action( 'load-plugins.php', 'wp_update_plugins' );
     362        add_action( 'load-update.php', 'wp_update_plugins' );
     363        add_action( 'load-update-core.php', 'wp_update_plugins' );
     364        add_action( 'admin_init', '_maybe_update_plugins' );
     365        add_action( 'wp_update_plugins', 'wp_update_plugins' );
     366        add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 );
     367        add_action( 'load-themes.php', 'wp_update_themes' );
     368        add_action( 'load-update.php', 'wp_update_themes' );
     369        add_action( 'load-update-core.php', 'wp_update_themes' );
     370        add_action( 'admin_init', '_maybe_update_themes' );
     371        add_action( 'wp_update_themes', 'wp_update_themes' );
     372        add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 );
     373        add_action( 'update_option_WPLANG', 'wp_clean_update_cache' , 10, 0 );
     374        add_action( 'wp_maybe_auto_update', 'wp_maybe_auto_update' );
     375        add_action( 'init', 'wp_schedule_update_checks' );
     376}
    375377
    376378// Canonical
    377379add_action( 'template_redirect', 'redirect_canonical' );
  • src/wp-includes/update.php

     
    665665        wp_clean_themes_cache();
    666666        delete_site_transient( 'update_core' );
    667667}
    668 
    669 if ( ( ! is_main_site() && ! is_network_admin() ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
    670         return;
    671 }