Skip to:
Content

BuddyPress.org

Ticket #893: 893-jjj.patch

File 893-jjj.patch, 1.5 KB (added by johnjamesjacoby, 15 years ago)

Patch bp_has_activities

  • bp-activity-templatetags.php

     
    129129                'user_id' => false,
    130130                'per_page' => 25,
    131131                'max' => false,
    132                 'timeframe' => '-4 weeks'
     132                'timeframe' => '-4 weeks',
     133                'override' => false
    133134        );
    134135
    135136        $r = wp_parse_args( $args, $defaults );
    136137        extract( $r, EXTR_SKIP );
    137138       
    138         // The following lines are for backwards template compatibility.
    139         if ( 'my-friends' == $bp->current_action && $bp->activity->slug == $bp->current_component )
    140                 $type = 'friends';
    141        
    142         if ( $bp->displayed_user->id && $bp->activity->slug == $bp->current_component && ( !$bp->current_action || 'just-me' == $bp->current_action ) )
    143                 $type = 'personal';
    144        
    145         if ( $bp->displayed_user->id && $bp->profile->slug == $bp->current_component )
    146                 $type = 'personal';
     139        // bypass backwards compatability check
     140        if ($override == false) {
     141                // The following lines are for backwards template compatibility.
     142                if ( 'my-friends' == $bp->current_action && $bp->activity->slug == $bp->current_component )
     143                        $type = 'friends';
     144               
     145                if ( $bp->displayed_user->id && $bp->activity->slug == $bp->current_component && ( !$bp->current_action || 'just-me' == $bp->current_action ) )
     146                        $type = 'personal';
     147               
     148                if ( $bp->displayed_user->id && $bp->profile->slug == $bp->current_component )
     149                        $type = 'personal';
     150        }
    147151
    148152        if ( $bp_activity_limit )
    149153                $max = $bp_activity_limit;