WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/10/2015 11:19:02 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Revert the part of [31168] that [31701] was trying to fix.

default-filters.php is loaded before the $current_site global is set, so is_main_site() cannot be used there.

fixes #30947.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/update.php

    r31701 r31708  
    664664    delete_site_transient( 'update_core' );
    665665}
     666
     667if ( ( ! is_main_site() && ! is_network_admin() ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
     668    return;
     669}
     670
     671add_action( 'admin_init', '_maybe_update_core' );
     672add_action( 'wp_version_check', 'wp_version_check' );
     673add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 );
     674
     675add_action( 'load-plugins.php', 'wp_update_plugins' );
     676add_action( 'load-update.php', 'wp_update_plugins' );
     677add_action( 'load-update-core.php', 'wp_update_plugins' );
     678add_action( 'admin_init', '_maybe_update_plugins' );
     679add_action( 'wp_update_plugins', 'wp_update_plugins' );
     680add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 );
     681
     682add_action( 'load-themes.php', 'wp_update_themes' );
     683add_action( 'load-update.php', 'wp_update_themes' );
     684add_action( 'load-update-core.php', 'wp_update_themes' );
     685add_action( 'admin_init', '_maybe_update_themes' );
     686add_action( 'wp_update_themes', 'wp_update_themes' );
     687add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 );
     688
     689add_action( 'update_option_WPLANG', 'wp_clean_update_cache' , 10, 0 );
     690
     691add_action( 'wp_maybe_auto_update', 'wp_maybe_auto_update' );
     692
     693add_action( 'init', 'wp_schedule_update_checks' );
Note: See TracChangeset for help on using the changeset viewer.