Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/31/2011 01:12:04 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Audit _is_ functions and _current_component_ functions. Props r-a-y. Fixes #3399.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-actions.php

    r4961 r5072  
    242242    global $bp, $wp_query;
    243243
    244     if ( !bp_is_current_component( 'activity' ) || !bp_is_current_action( 'feed' ) || bp_is_user() || !empty( $bp->groups->current_group ) )
     244    if ( !bp_is_activity_component() || !bp_is_current_action( 'feed' ) || bp_is_user() || !empty( $bp->groups->current_group ) )
    245245        return false;
    246246
     
    256256    global $bp, $wp_query;
    257257
    258     if ( !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( 'feed' ) )
     258    if ( !bp_is_user_activity() || !bp_is_current_action( 'feed' ) )
    259259        return false;
    260260
     
    270270    global $bp, $wp_query;
    271271
    272     if ( !bp_is_active( 'friends' ) || !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( bp_get_friends_slug() ) || !bp_is_action_variable( 'feed', 0 ) )
     272    if ( !bp_is_active( 'friends' ) || !bp_is_user_activity() || !bp_is_current_action( bp_get_friends_slug() ) || !bp_is_action_variable( 'feed', 0 ) )
    273273        return false;
    274274
     
    284284    global $bp, $wp_query;
    285285
    286     if ( !bp_is_active( 'groups' ) || !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( bp_get_groups_slug() ) || !bp_is_action_variable( 'feed', 0 ) )
     286    if ( !bp_is_active( 'groups' ) || !bp_is_user_activity() || !bp_is_current_action( bp_get_groups_slug() ) || !bp_is_action_variable( 'feed', 0 ) )
    287287        return false;
    288288
     
    298298    global $bp, $wp_query;
    299299
    300     if ( !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( 'mentions' ) || !bp_is_action_variable( 'feed', 0 ) )
     300    if ( !bp_is_user_activity() || !bp_is_current_action( 'mentions' ) || !bp_is_action_variable( 'feed', 0 ) )
    301301        return false;
    302302
     
    312312    global $bp, $wp_query;
    313313
    314     if ( !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( 'favorites' ) || !bp_is_action_variable( 'feed', 0 ) )
     314    if ( !bp_is_user_activity() || !bp_is_current_action( 'favorites' ) || !bp_is_action_variable( 'feed', 0 ) )
    315315        return false;
    316316
Note: See TracChangeset for help on using the changeset viewer.