-
Notifications
You must be signed in to change notification settings - Fork 798
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Autoloader: use all of the map files to populate the global maps (#15002
) * Autoloader: loop through all map files in enqueue_files() The latest autoloader needs to loop through all of the classmap and filemap files created by the new autoloader and populate the globals. Add a loop through the active plugins to the enqueue_files() function. * Autoloader: improve enqueue_files Improve enqueue_files() by: - checking the map files with is_readable instead of file_exists - checking that the local map variables are arrays before using them - move the file_loader() block out of the active plugins loop * Autoloader: remove plugins_loaded action conditional around file_loader We no longer need to wait until the plugins_loaded action to call file_loader(), so remove the conditionals and the plugins_loaded hook. * Autoloader: Handle an activating plugin When a plugin is in the process of activating, it won't be in the active plugins list yet. We need to make sure that its classmap and filemap files are processed and the globals are updated so that the autoloader can use them with the newly activated plugin. - In enqueue_files(), process the current plugin's map file and the map files for all active plugins. - In set_up_autoloader(), detect if a new autoloader has been loaded by an activating plugin. If it has, reset the global classmap. * Autoloader: handle an activating plugin When a plugin is in the process of activating, it's not in the active plugins list. We need to add the activating plugin's packages to the autoloader before the plugin loads. * Added a check against bulk activation. * Added network activated plugins to the active plugin list. * Added a nonce 'check'. Co-authored-by: Igor Zinovyev <zinigor@gmail.com>
- Loading branch information
Showing
1 changed file
with
144 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters