<filter>

The bbPress filter hook.

Description

apply_filters( '<filter>', (number) $count, (unknown) $user_id ); 

Parameters (2)

0. $count (number)
The count.
1. $user_id (unknown)
The user id.

Usage

To run the hook, copy the example below.
  1. $count = apply_filters( '{$filter}', $count, $user_id ); 
  2.  
  3. if ( !empty( $count ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the <filter> callback 
  2. function filter_filter( $count, $user_id ) { 
  3. // make filter magic happen here... 
  4. return $count
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( "{$filter}", 'filter_filter', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( "{$filter}", 'filter_filter', 10, 2 ); 

Defined (16)

The filter is defined in the following location(s).

/includes/users/options.php  
  1. return apply_filters( $filter, $count, $user_id ); 
  1. return apply_filters( $filter, $count, $user_id ); 
  1. return apply_filters( $filter, $count, $user_id ); 
/includes/topics/template.php  
  1. return apply_filters( $filter, $count, $topic_id ); 
  1. return apply_filters( $filter, $replies, $topic_id ); 
  1. return apply_filters( $filter, $replies, $topic_id ); 
  1. return apply_filters( $filter, $replies, $topic_id ); 
  1. return apply_filters( $filter, $voices, $topic_id ); 
/includes/replies/template.php  
  1. return apply_filters( $filter, $count, $reply_id ); 
/includes/forums/template.php  
  1. return apply_filters( $filter, $forum_count, $forum_id ); 
  1. return apply_filters( $filter, $topics, $forum_id ); 
  1. return apply_filters( $filter, $replies, $forum_id ); 
  1. return apply_filters( $filter, $retval, $forum_id ); 
  1. return apply_filters( $filter, $topics, $forum_id ); 
/includes/extend/buddypress/notifications.php  
  1. $return = apply_filters( $filter, '<a href="' . esc_url( $topic_link ) . '" title="' . esc_attr( $title_attr ) . '">' . esc_html( $text ) . '</a>', (int) $total_items, $text, $topic_link ); 
  1. $return = apply_filters( $filter, array(