bbp_bump_forum_reply_count

The bbPress bbp bump forum reply count hook.

Description

apply_filters( 'bbp_bump_forum_reply_count', (int) $int_total_reply_count_int_difference, (unknown) $forum_id, (int) $int_difference, (bool) $bool_update_ancestors ); 

Parameters (4)

0. $int_total_reply_count_int_difference (int) => (int) $total_reply_count + (int) $difference
The int total reply count int difference.
1. $forum_id (unknown)
The forum id.
2. $int_difference (int) => (int) $difference
The int difference.
3. $bool_update_ancestors (bool) => (bool) $update_ancestors
The bool update ancestors.

Usage

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

Defined (1)

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

/includes/forums/functions.php  
  1. return (int) apply_filters( 'bbp_bump_forum_reply_count', (int) $total_reply_count + (int) $difference, $forum_id, (int) $difference, (bool) $update_ancestors );