From 54b569b44ddc96dd2180bca76fc395d0a0743839 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Mon, 7 Oct 2013 19:34:09 +0000 Subject: [PATCH] Inline documentation for hooks in wp-settings.php. Props miyauchi. Fixes #25469 Built from https://develop.svn.wordpress.org/trunk@25721 git-svn-id: http://core.svn.wordpress.org/trunk@25634 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-settings.php | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/wp-settings.php b/wp-settings.php index 24aee9384c..553ec2476c 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -171,6 +171,11 @@ if ( is_multisite() ) { unset( $network_plugin ); } +/** + * Fires once all must-use and network-activated plugins have loaded. + * + * @since 2.8.0 + */ do_action( 'muplugins_loaded' ); if ( is_multisite() ) @@ -209,6 +214,13 @@ wp_set_internal_encoding(); if ( WP_CACHE && function_exists( 'wp_cache_postload' ) ) wp_cache_postload(); +/** + * Fires once activated plugins have loaded. + * + * Pluggable functions are also available at this point in the loading order. + * + * @since 1.5.2 + */ do_action( 'plugins_loaded' ); // Define constants which affect functionality if not already defined. @@ -217,6 +229,11 @@ wp_functionality_constants(); // Add magic quotes and set up $_REQUEST ( $_GET + $_POST ) wp_magic_quotes(); +/** + * Fires when comment cookies are sanitized. + * + * @since 2.0.11 + */ do_action( 'sanitize_comment_cookies' ); /** @@ -262,6 +279,11 @@ $GLOBALS['wp_widget_factory'] = new WP_Widget_Factory(); */ $GLOBALS['wp_roles'] = new WP_Roles(); +/** + * Fires before the theme is loaded. + * + * @since 2.6.0 + */ do_action( 'setup_theme' ); // Define the template related constants. @@ -294,17 +316,26 @@ if ( ! defined( 'WP_INSTALLING' ) || 'wp-activate.php' === $pagenow ) { include( TEMPLATEPATH . '/functions.php' ); } +/** + * Fires after the theme is loaded. + * + * @since 3.0.0 + */ do_action( 'after_setup_theme' ); // Set up current user. $wp->init(); /** + * Fires after WordPress has finished loading but before any headers are sent. + * * 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. + * + * @since 1.5.2 */ do_action( 'init' ); @@ -327,4 +358,4 @@ if ( is_multisite() ) { * * @since 3.0.0 */ -do_action('wp_loaded'); +do_action( 'wp_loaded' );