wp_loaded
Action HookDescription
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.Hook Information
File Location |
wp-settings.php
View on GitHub
|
Hook Type | Action |
Line Number | 749 |
Hook Parameters
This hook doesn't accept any parameters.
Usage Examples
Basic Usage
<?php
// Hook into wp_loaded
add_action('wp_loaded', 'my_custom_function');
function my_custom_function() {
// Your custom code here
}
Source Code Context
wp-settings.php:749
- How this hook is used in WordPress core
<?php
744 *
745 * @link https://developer.wordpress.org/plugins/javascript/ajax
746 *
747 * @since 3.0.0
748 */
749 do_action( 'wp_loaded' );
PHP Documentation
<?php
/**
* 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
*/
Quick Info
- Hook Type: Action
- Parameters: 0
- File: wp-settings.php
Related Hooks
Related hooks will be displayed here in future updates.