Skip to:
Content

BuddyPress.org

Changeset 2656 for trunk/bp-core.php


Ignore:
Timestamp:
02/10/2010 09:13:14 PM (15 years ago)
Author:
apeatling
Message:

Moving BuddyPress registration functions to their own actions. Props jjj

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core.php

    r2653 r2656  
    182182    do_action( 'bp_core_setup_globals' );
    183183}
    184 add_action( 'plugins_loaded', 'bp_core_setup_globals', 5 );
     184add_action( 'bp_setup_globals', 'bp_core_setup_globals' );
    185185add_action( '_admin_menu', 'bp_core_setup_globals', 2 ); // must be _admin_menu hook.
    186186
     
    378378    }
    379379}
    380 add_action( 'plugins_loaded', 'bp_core_setup_nav' );
     380add_action( 'bp_setup_nav', 'bp_core_setup_nav' );
    381381add_action( 'admin_menu', 'bp_core_setup_nav' );
    382382
     
    20632063add_filter( 'login_redirect', 'bp_core_login_redirect' );
    20642064
     2065
     2066/********************************************************************************
     2067 * Custom Actions
     2068 *
     2069 * Functions to set up custom BuddyPress actions that all other components can
     2070 * hook in to.
     2071 */
     2072
     2073/* Allow core components and dependent plugins to set globals */
     2074function bp_setup_globals() {
     2075    do_action( 'bp_setup_globals' );
     2076}
     2077add_action( 'plugins_loaded', 'bp_setup_globals', 5 );
     2078
     2079/* Allow core components and dependent plugins to set root components */
     2080function bp_setup_root_components() {
     2081    do_action( 'bp_setup_root_components' );
     2082}
     2083add_action( 'plugins_loaded', 'bp_setup_root_components', 2 );
     2084
     2085/* Allow core components and dependent plugins to set their nav */
     2086function bp_setup_nav() {
     2087    do_action( 'bp_setup_nav' );
     2088}
     2089add_action( 'plugins_loaded', 'bp_setup_nav' );
     2090
     2091
     2092/********************************************************************************
     2093 * Caching
     2094 *
     2095 * Caching functions handle the clearing of cached objects and pages on specific
     2096 * actions throughout BuddyPress.
     2097 */
     2098
    20652099/**
    20662100 * bp_core_clear_user_object_cache()
Note: See TracChangeset for help on using the changeset viewer.