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-buddybar.php

    r3861 r3917  
    6363    if ( bp_is_current_component( $slug ) && !bp_current_action() ) {
    6464        if ( !is_object( $screen_function[0] ) )
    65             add_action( 'wp', $screen_function, 3 );
     65            add_action( 'bp_screens', $screen_function );
    6666        else
    67             add_action( 'wp', array( &$screen_function[0], $screen_function[1] ), 3 );
     67            add_action( 'bp_screens', array( &$screen_function[0], $screen_function[1] ), 3 );
    6868
    6969        if ( !empty( $default_subnav_slug ) )
     
    9292    if ( $function = $bp->bp_nav[$parent_slug]['screen_function'] ) {
    9393        if ( !is_object( $function[0] ) )
    94             remove_action( 'wp', $function, 3 );
     94            remove_action( 'bp_screens', $function, 3 );
    9595        else
    96             remove_action( 'wp', array( &$function[0], $function[1] ), 3 );
     96            remove_action( 'bp_screens', array( &$function[0], $function[1] ), 3 );
    9797    }
    9898
     
    101101    if ( $bp->current_component == $parent_slug && !$bp->current_action ) {
    102102        if ( !is_object( $screen_function[0] ) )
    103             add_action( 'wp', $screen_function, 3 );
     103            add_action( 'bp_screens', $screen_function );
    104104        else
    105             add_action( 'wp', array( &$screen_function[0], $screen_function[1] ), 3 );
     105            add_action( 'bp_screens', array( &$screen_function[0], $screen_function[1] ) );
    106106
    107107        if ( $subnav_slug )
     
    189189    if ( ( $bp->current_action == $slug && $bp->current_component == $parent_slug ) && $user_has_access ) {
    190190        if ( !is_object( $screen_function[0] ) )
    191             add_action( 'wp', $screen_function, 3 );
     191            add_action( 'bp_screens', $screen_function );
    192192        else
    193             add_action( 'wp', array( &$screen_function[0], $screen_function[1] ), 3 );
     193            add_action( 'bp_screens', array( &$screen_function[0], $screen_function[1] ) );
    194194    }
    195195}
     
    244244    if ( $function = $bp->bp_nav[$parent_id]['screen_function'] ) {
    245245        if ( !is_object( $function[0] ) ) {
    246             remove_action( 'wp', $function, 3 );
     246            remove_action( 'bp_screens', $function );
    247247        } else {
    248             remove_action( 'wp', array( &$function[0], $function[1] ), 3 );
     248            remove_action( 'bp_screens', array( &$function[0], $function[1] ) );
    249249        }
    250250    }
     
    267267    if ( $screen_function ) {
    268268        if ( !is_object( $screen_function[0] ) )
    269             remove_action( 'wp', $screen_function, 3 );
     269            remove_action( 'bp_screens', $screen_function );
    270270        else
    271             remove_action( 'wp', array( &$screen_function[0], $screen_function[1] ), 3 );
     271            remove_action( 'bp_screens', array( &$screen_function[0], $screen_function[1] ) );
    272272    }
    273273
     
    484484    _e( 'Notifications', 'buddypress' );
    485485
    486     if ( $notifications = bp_users_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?>
     486    if ( $notifications = bp_members_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?>
    487487        <span><?php echo count( $notifications ) ?></span>
    488488    <?php
Note: See TracChangeset for help on using the changeset viewer.