WordPress.org

Make WordPress Core

Changeset 13481


Ignore:
Timestamp:
02/28/10 03:08:16 (4 years ago)
Author:
dd32
Message:

add a wp_loaded action that fires once WordPress init has finished. Props Denis-de-Bernardy. See #12400

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-settings.php

    r13366 r13481  
    278278$wp->init(); 
    279279 
    280 // Everything is loaded and initialized. 
     280/** 
     281 * Most of WP is loaded at this stage, and the user is authenticated. WP continues 
     282 * to load on the init hook that follows (e.g. widgets), and many plugins instantiate 
     283 * themselves on it for all sorts of reasons (e.g. they need a user, a taxonomy, etc.). 
     284 * 
     285 * If you wish to plug an action once WP is loaded, use the wp_loaded hook below. 
     286 */ 
    281287do_action( 'init' ); 
    282288 
     289/** 
     290 * The purpose of this hook is to fire actions once WP, all plugins, and the theme, 
     291 * are fully loaded and instantiated. 
     292 * 
     293 * AJAX requests should use wp-ajax.php and wp-admin/admin-ajax.php instead. 
     294 *  
     295 * @since 3.0 
     296 */ 
     297do_action('wp_loaded'); 
    283298?> 
Note: See TracChangeset for help on using the changeset viewer.