bbp_topic_notices

The bbPress bbp topic notices hook.

Description

apply_filters( 'bbp_topic_notices', (unknown) $notice_text, (unknown) $topic_status, (unknown) $bbp_get_topic_id ); 

Parameters (3)

0. $notice_text (unknown)
The notice text.
1. $topic_status (unknown)
The topic status.
2. $bbp_get_topic_id (unknown) => bbp_get_topic_id()
The bbp get topic id.

Usage

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

Defined (1)

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

/includes/topics/template.php  
  1. $notice_text = apply_filters( 'bbp_topic_notices', $notice_text, $topic_status, bbp_get_topic_id() );