Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

  • rmstm
    Participant

    @rmstm

    Hello,

    I know this topic is well aged, but I had to find a way to do the same thing and didn’t find any good answer throughout the web. As this post is referenced in Google, here my way to do it :

    function add_excluded_type( $where_conditions, $r, $select_sql, $from_sql, $join_sql ) {
    	$type_to_exclude = 'type_name';
    
    	$where_conditions['excluded_types'] = ! empty( $where_conditions['excluded_types'] )
    		? preg_replace( '/\)$/', ", '$type_to_exclude'$0", $where_conditions['excluded_types'] )
    		: "a.type NOT IN ('$type_to_exclude')";
    	
    	return $where_conditions;
    }
    
    add_filter( 'bp_activity_get_where_conditions', 'add_excluded_type', 10, 5 );

    Hope this help next coders !


    rmstm
    Participant

    @rmstm

    Ok, I just find what I want, thanks to the buddyreshare plugin.

    I was looking for this filter hook :

    add_filter( ‘bp_activity_set_just-me_scope_args’, […], 20, 2 ); from the activity.php file in this plugin.

    Thank you 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
Skip to toolbar