bb_get_tagged_topic_ids

The BuddyPress bb get tagged topic ids function.

Description

bb_get_tagged_topic_ids( $tag_id ); 

Parameters (1)

0. $tag_id
The tag id.

Usage

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

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-topic-tags.php  
  1. function bb_get_tagged_topic_ids( $tag_id ) { 
  2. global $wp_taxonomy_object, $tagged_topic_count; 
  3.  
  4. if ( $topic_ids = (array) $wp_taxonomy_object->get_objects_in_term( $tag_id, 'bb_topic_tag', array( 'field' => 'tt_id' ) ) ) { 
  5. $tagged_topic_count = count($topic_ids); 
  6. return apply_filters('get_tagged_topic_ids', $topic_ids); 
  7. } else { 
  8. $tagged_topic_count = 0; 
  9. return false;