Skip to:
Content

BuddyPress.org

Changeset 5071


Ignore:
Timestamp:
08/31/2011 12:35:51 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Add active check to bp_is_user_friends_activity() and bp_is_user_groups_activity() and return false if component is inactive. Fixes #3530.

File:
1 edited

Legend:

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

    r5066 r5071  
    11051105        global $bp;
    11061106
    1107         if ( bp_is_current_component( 'activity' ) && bp_is_current_action( bp_get_friends_slug() ) )
     1107        if ( !bp_is_active( 'friends' ) )
     1108                return false;
     1109
     1110        if ( bp_is_activity_component() && bp_is_current_action( bp_get_friends_slug() ) )
    11081111                return true;
    11091112
    … …  
    11141117        global $bp;
    11151118
    1116         if ( bp_is_current_component( 'activity' ) && bp_is_current_action( bp_get_groups_slug() ) )
     1119        if ( !bp_is_active( 'groups' ) )
     1120                return false;
     1121
     1122        if ( bp_is_activity_component() && bp_is_current_action( bp_get_groups_slug() ) )
    11171123                return true;
    11181124
    … …  
    11231129        global $bp;
    11241130
    1125         if ( bp_is_current_component( 'xprofile' ) || bp_is_current_component( 'profile' ) )
     1131        if ( bp_is_profile_component() || bp_is_current_component( 'profile' ) )
    11261132                return true;
    11271133
    … …  
    11321138        global $bp;
    11331139
    1134         if ( bp_is_current_component( 'xprofile' ) && bp_is_current_action( 'edit' ) )
     1140        if ( bp_is_profile_component() && bp_is_current_action( 'edit' ) )
    11351141                return true;
    11361142
Note: See TracChangeset for help on using the changeset viewer.