Skip to:
Content
Pages
Categories
Search
Top
Bottom

Bug: The Activitystream Filter expects an Array of Activytype


  • Joachim
    Participant

    @joesy

    Since buddypress 2.8 the “bp_has_activities” function expects inside an array of the activity type(action), but get a comma seperated string, if you use the select box to filter (multiple) activities (e.g.: friends). Please can you fix this?

    for the moment, this workarround works for me

    
     add_filter('bp_before_has_activities_parse_args', function($r){
         if(isset($r["type"]) && !isset($r["action"])){
             $r["action"]=$r["type"]=explode(',',$r["type"]);
         }
         return $r;
    
     }, 2);
    
  • You must be logged in to reply to this topic.
Skip to toolbar