Make WordPress Core


Ignore:
Timestamp:
03/10/2015 11:19:02 PM (10 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/default-filters.php

    r31701 r31708  
    359359add_action( 'init', 'create_initial_taxonomies', 0 ); // highest priority
    360360
    361 // Update
    362 if ( ( is_main_site() || is_network_admin() ) && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
    363     add_action( 'admin_init',                '_maybe_update_core'              );
    364     add_action( 'wp_version_check',          'wp_version_check'                );
    365     add_action( 'upgrader_process_complete', 'wp_version_check',         10, 0 );
    366 
    367     add_action( 'load-plugins.php',          'wp_update_plugins'               );
    368     add_action( 'load-update.php',           'wp_update_plugins'               );
    369     add_action( 'load-update-core.php',      'wp_update_plugins'               );
    370     add_action( 'admin_init',                '_maybe_update_plugins'           );
    371     add_action( 'wp_update_plugins',         'wp_update_plugins'               );
    372     add_action( 'upgrader_process_complete', 'wp_update_plugins',        10, 0 );
    373 
    374     add_action( 'load-themes.php',           'wp_update_themes'                );
    375     add_action( 'load-update.php',           'wp_update_themes'                );
    376     add_action( 'load-update-core.php',      'wp_update_themes'                );
    377     add_action( 'admin_init',                '_maybe_update_themes'            );
    378     add_action( 'wp_update_themes',          'wp_update_themes'                );
    379     add_action( 'upgrader_process_complete', 'wp_update_themes',         10, 0 );
    380 
    381     add_action( 'update_option_WPLANG',      'wp_clean_update_cache',    10, 0 );
    382     add_action( 'wp_maybe_auto_update',      'wp_maybe_auto_update'            );
    383     add_action( 'init',                      'wp_schedule_update_checks'       );
    384 }
    385 
    386361// Canonical
    387362add_action( 'template_redirect', 'redirect_canonical' );
Note: See TracChangeset for help on using the changeset viewer.