Skip to content

Commit

Permalink
add a wp_loaded action that fires once WordPress init has finished. P…
Browse files Browse the repository at this point in the history
…rops Denis-de-Bernardy. See #12400

git-svn-id: http://svn.automattic.com/wordpress/trunk@13481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
dd32 committed Feb 28, 2010
1 parent 0407057 commit cde78a7
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion wp-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,22 @@
// Set up current user.
$wp->init();

// Everything is loaded and initialized.
/**
* Most of WP is loaded at this stage, and the user is authenticated. WP continues
* to load on the 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 wp_loaded hook below.
*/
do_action( 'init' );

/**
* The purpose of this hook is to fire actions once WP, all plugins, and the theme,
* are fully loaded and instantiated.
*
* AJAX requests should use wp-ajax.php and wp-admin/admin-ajax.php instead.
*
* @since 3.0
*/
do_action('wp_loaded');
?>

0 comments on commit cde78a7

Please sign in to comment.