This hook is fired once WP, all plugins, and the theme are fully loaded and instantiated.
Description
Ajax requests should use wp-admin/admin-ajax.php. admin-ajax.php can handle requests for users not logged in.
Source
do_action( 'wp_loaded' );
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
Migrate from Codex:
Minify HTML codes when page is output
If you only want to load a function only in the front end.
Same as above, but using anonymous function (PHP 5.3 or higher).