bb_pre_forum_name

The WordPress Core bb pre forum name hook.

Description

apply_filters( 'bb_pre_forum_name', (string) $stripslashes ); 

Parameters (1)

0. $stripslashes (string) => stripslashes( wp_specialchars_decode( $forum_name, ENT_QUOTES ) )
The stripslashes.

Usage

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

Defined (3)

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

/bp-forums/bbpress/bb-admin/includes/functions.bb-admin.php  
  1. $forum_name = apply_filters( 'bb_pre_forum_name', stripslashes( wp_specialchars_decode( $forum_name, ENT_QUOTES ) ) ); 
  1. $forum_name = apply_filters( 'bb_pre_forum_name', stripslashes( wp_specialchars_decode( $forum_name, ENT_QUOTES ) ), $forum_id ); 
/bp-forums/bbpress/bb-includes/defaults.bb-filters.php  
  1. add_filter( 'bb_pre_forum_name', 'bb_trim_for_db_150', 9999 );