Skip to:
Content

BuddyPress.org

Changes between Initial Version and Version 1 of Ticket #5665, comment 4


Ignore:
Timestamp:
06/05/2014 05:42:35 PM (10 years ago)
Author:
shanebp
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5665, comment 4

    initial v1  
    99
    1010re #2 Activity - I just use the 'bp_activity_get_where_conditions' filter and add a couple NOT IN $blocked_ids to the $where_conditions array
     11
     12{{{
     13function _activity_where_query( $where_conditions, $r, $select_sql, $from_sql, $join_sq) {
     14       
     15        if( !empty( $this->their_blocked_ids ) ) {
     16
     17                $blocked_ids = implode(",", $this->their_blocked_ids);
     18
     19                $where_conditions["blocked_sql"] = "a.user_id NOT IN ({$blocked_ids}) AND a.secondary_item_id NOT IN ({$blocked_ids}) ";
     20       
     21        }                       
     22
     23        return $where_conditions;
     24
     25}
     26}}}
     27
     28
     29
    1130
    1231>Activity at-mention filtering is tricky.
     
    3049To see my plugin roster, visit http://www.philopress.com/.
    3150I just released a couple of Group plugins.
    32