😍Thứ tự của các do_action cần chú ý trong wp-settings.php
wp-settings.php
<?php
/**
* Fires once a single must-use plugin has loaded.
*
* @since 5.1.0
*
* @param string $mu_plugin Full path to the plugin's main file.
*/
do_action('mu_plugin_loaded', $mu_plugin);
/**
* Fires once a single network-activated plugin has loaded.
*
* @since 5.1.0
*
* @param string $network_plugin Full path to the plugin's main file.
*/
do_action('network_plugin_loaded', $network_plugin);
/**
* Fires once all must-use and network-activated plugins have loaded.
*
* @since 2.8.0
*/
do_action('muplugins_loaded');
/**
* Fires once a single activated plugin has loaded.
*
* @since 5.1.0
*
* @param string $plugin Full path to the plugin's main file.
*/
do_action('plugin_loaded', $plugin);
/**
* Fires once activated plugins have loaded.
*
* Pluggable functions are also available at this point in the loading order.
*
* @since 1.5.0
*/
do_action('plugins_loaded');
/**
* Fires when comment cookies are sanitized.
*
* @since 2.0.11
*/
do_action('sanitize_comment_cookies');
/**
* Fires before the theme is loaded.
*
* @since 2.6.0
*/
do_action('setup_theme');
/**
* Fires after the theme is loaded.
*
* @since 3.0.0
*/
do_action('after_setup_theme');
/**
* Fires after WordPress has finished loading but before any headers are sent.
*
* Most of WP is loaded at this stage, and the user is authenticated. WP continues
* to load on the {@see 'init'} hook that follows (e.g. widgets), and many plugins instantiate
* themselves on it for all sorts of reasons (e.g. they need a user, a taxonomy, etc.).
*
* If you wish to plug an action once WP is loaded, use the {@see 'wp_loaded'} hook below.
*
* @since 1.5.0
*/
do_action('init');
/**
* This hook is fired once WP, all plugins, and the theme are fully loaded and instantiated.
*
* Ajax requests should use wp-admin/admin-ajax.php. admin-ajax.php can handle requests for
* users not logged in.
*
* @link https://developer.wordpress.org/plugins/javascript/ajax
*
* @since 3.0.0
*/
do_action('wp_loaded');
PreviousDự án Feature Link StudyNextHướng dẫn ghi đè (override) folder INC trong child-theme Flatsome (ok)
Last updated