bb_export_topic_tags

The BuddyPress bb export topic tags function.

Description

bb_export_topic_tags( $r, $topic_id ); 

Parameters (2)

0. $r
The r.
1. $topic_id
The topic id.

Usage

  1. if ( !function_exists( 'bb_export_topic_tags' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-admin/export.php'; 
  3.  
  4. // The r. 
  5. $r = null; 
  6.  
  7. // The topic id. 
  8. $topic_id = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bb_export_topic_tags($r, $topic_id); 
  12.  

Defined (1)

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

/bp-forums/bbpress/bb-admin/export.php  
  1. function bb_export_topic_tags( $r, $topic_id ) { 
  2. global $topic_tag_cache; 
  3. if ( !get_topic( $topic_id ) ) 
  4. return; 
  5.  
  6. if ( !$tags = bb_get_topic_tags( $topic_id ) ) 
  7. return $r; 
  8.  
  9. $r .= "\n"; 
  10.  
  11. foreach ( (array) $tags as $tag ) 
  12. $r .= bb_export_tag( $tag ); 
  13. $topic_tag_cache = array(); 
  14.  
  15. return $r;