Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/25/2011 08:58:56 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Rename new 'bp-users' component to 'bp-members' for consistency through-out project.
Core, Messages, and Friends Components now use the BP_Component class.
Split Friends and Messages components into smaller files.
Change references to 'profile' to 'xprofile' through-out project for consistency.
Introduce 'bp_actions' and 'bp_screens' standard hooks to replace the usage of 'wp' through-out project.
Move component loader sequence into bp-core-bootstrap.php,
Move old root_component action into 1.3 deprecated file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-hooks.php

    r3874 r3917  
    77add_action( 'bp_loaded',      'bp_include', 2  );
    88
     9add_action( 'wp',             'bp_actions', 2  );
     10
     11add_action( 'wp',             'bp_screens', 2  );
    912
    1013/** Init **********************************************************************/
    1114
    1215// Attach bp_init to WordPress init
    13 add_action( 'init',    'bp_init'                     );
     16add_action( 'init',       'bp_init'                    );
    1417
    1518// Parse the URI and set globals
    16 add_action( 'bp_init', 'bp_core_set_uri_globals', 2 );
     19add_action( 'bp_init',    'bp_core_set_uri_globals', 2 );
    1720
    1821// Setup component globals
    19 add_action( 'bp_init', 'bp_setup_globals',         4 );
    20 
    21 // Setup root directories for components
    22 add_action( 'bp_init', 'bp_setup_root_components', 6 );
     22add_action( 'bp_init',    'bp_setup_globals',        4 );
    2323
    2424// Setup the navigation menu
    25 add_action( 'bp_init', 'bp_setup_nav',             8 );
     25add_action( 'bp_init',    'bp_setup_nav',            8 );
    2626
    2727// Setup widgets
    28 add_action( 'bp_init', 'bp_setup_widgets',         8 );
     28add_action( 'bp_init',    'bp_setup_widgets',        8 );
    2929   
    3030// Setup admin bar
    31 add_action( 'bp_loaded', 'bp_core_load_admin_bar'   );
     31add_action( 'bp_loaded',  'bp_core_load_admin_bar'    );
    3232
     33/** The hooks *****************************************************************/
     34
     35/**
     36 * Include files on this action
     37 */
     38function bp_include() {
     39    do_action( 'bp_include' );
     40}
     41
     42/**
     43 * Setup global variables and objects
     44 */
     45function bp_setup_globals() {
     46    do_action( 'bp_setup_globals' );
     47}
     48
     49/**
     50 * Set navigation elements
     51 */
     52function bp_setup_nav() {
     53    do_action( 'bp_setup_nav' );
     54}
     55
     56/**
     57 * Set the page title
     58 */
     59function bp_setup_title() {
     60    do_action( 'bp_setup_title' );
     61}
     62
     63/**
     64 * Register widgets
     65 */
     66function bp_setup_widgets() {
     67    do_action( 'bp_register_widgets' );
     68}
     69
     70/**
     71 * Initlialize code
     72 */
     73function bp_init() {
     74    do_action( 'bp_init' );
     75}
     76
     77/**
     78 * Attached to plugins_loaded
     79 */
     80function bp_loaded() {
     81    do_action( 'bp_loaded' );
     82}
     83
     84/**
     85 * Attach potential template actions
     86 */
     87function bp_actions() {
     88    do_action( 'bp_actions' );
     89}
     90
     91/**
     92 * Attach potential template screens
     93 */
     94function bp_screens() {
     95    do_action( 'bp_screens' );
     96}
    3397
    3498?>
Note: See TracChangeset for help on using the changeset viewer.