bb_get_tag_name

The BuddyPress bb get tag name function.

Description

bb_get_tag_name( (int) $tag_id = 0 ); 

Parameters (1)

0. $tag_id — Optional. (int)
The tag id.

Usage

  1. if ( !function_exists( 'bb_get_tag_name' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-template.php'; 
  3.  
  4. // The tag id. 
  5. $tag_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bb_get_tag_name($tag_id); 
  9.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-template.php  
  1. function bb_get_tag_name( $tag_id = 0 ) { 
  2. global $tag; 
  3.  
  4. if ( $tag_id ) { 
  5. if ( is_object( $tag_id ) ) { 
  6. $_tag = $tag_id; 
  7. } else { 
  8. $_tag = bb_get_tag( $tag_id ); 
  9. } else { 
  10. $_tag =& $tag; 
  11.  
  12. if ( !is_object( $_tag ) ) { 
  13. return ''; 
  14.  
  15. return $_tag->raw_tag;