bb_pre_term_slug

The BuddyPress bb pre term slug function.

Description

bb_pre_term_slug( $slug, (string) $taxonomy = '', (int) $term_id = 0 ); 

Parameters (3)

0. $slug
The slug.
1. $taxonomy — Optional. (string) => ''
The taxonomy.
2. $term_id — Optional. (int)
The term id.

Usage

  1. if ( !function_exists( 'bb_pre_term_slug' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-formatting.php'; 
  3.  
  4. // The slug. 
  5. $slug = null; 
  6.  
  7. // The taxonomy. 
  8. $taxonomy = ''; 
  9.  
  10. // The term id. 
  11. $term_id = -1; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = bb_pre_term_slug($slug, $taxonomy, $term_id); 
  15.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-formatting.php  
  1. function bb_pre_term_slug( $slug, $taxonomy = '', $term_id = 0 ) { 
  2. return bb_sanitize_with_dashes( $slug, 200 );