wp_loaded
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.
Usage
add_action( 'wp_loaded', 'wp_kama_loaded_action' ); /** * Function for `wp_loaded` action-hook. * * @return void */ function wp_kama_loaded_action(){ // action... }
Changelog
Since 3.0.0 | Introduced. |
Where the hook is called
In file: /wp-settings.php
wp_loaded
wp-settings.php 749
do_action( 'wp_loaded' );
Where the hook is used in WordPress
wp-includes/class-wp-customize-manager.php 375
add_action( 'wp_loaded', array( $this, 'wp_loaded' ) );
wp-includes/class-wp-customize-widgets.php 113
add_action( 'wp_loaded', array( $this, 'override_sidebars_widgets_for_theme_switch' ) );
wp-includes/class-wp-rewrite.php 1520
add_action( 'wp_loaded', array( $this, 'flush_rules' ) );
wp-includes/class-wp-rewrite.php 1878
add_action( 'wp_loaded', array( $this, 'flush_rules' ) );
wp-includes/cron.php 998
add_action( 'wp_loaded', '_wp_cron', 20 );
wp-includes/default-filters.php 543
add_action( 'wp_loaded', '_custom_header_background_just_in_time' );
wp-includes/default-filters.php 743
add_action( 'wp_loaded', '_add_template_loader_filters' );
wp-includes/deprecated.php 5886
add_action( 'wp_loaded', $fn_register_webfonts );