term_id_filter

The BuddyPress term id filter hook.

Description

apply_filters( 'term_id_filter', (unknown) $term_id, (unknown) $tt_id ); 

Parameters (2)

0. $term_id (unknown)
The term id.
1. $tt_id (unknown)
The tt id.

Usage

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

Defined (2)

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

/bp-forums/bbpress/bb-includes/backpress/class.wp-taxonomy.php  
  1. $term_id = apply_filters('term_id_filter', $term_id, $tt_id); 
  1. $term_id = apply_filters('term_id_filter', $term_id, $tt_id);