Some Useful Action Hooks

Hook that fires after loading a single plugin

plugin_loaded

add_action( 'plugin_loaded', 'do_something' );
function do_something(){
    // your code....
}

Hook that fires after loading all the plugins

plugins_loaded

add_action( 'plugins_loaded', 'do_something' );

Hook that fires after loading a single must-use plugin

mu_plugin_loaded

Hook that fires after loading a single network-activated plugin

network_plugin_loaded

Hook that fires after loading all the must-use and network-activated plugins have loaded

muplugins_loaded

Hook that fires before the theme is loaded

setup_theme

Hook that fires after the theme is loaded

after_setup_theme

Hook that fires after WordPress has finished loading but before any headers are sent

init

Hook that fires once WordPress, plugins, & theme are fully loaded and instantiated

wp_loaded

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.