bb_get_other_tags

The BuddyPress bb get other tags function.

Description

bb_get_other_tags( $topic_id, $user_id ); 

Parameters (2)

0. $topic_id
The topic id.
1. $user_id
The user id.

Usage

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

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_other_tags( $topic_id, $user_id ) { 
  2. $tags = bb_get_topic_tags( $topic_id ); 
  3. if ( !is_array( $tags ) ) 
  4. return; 
  5. $other_tags = array(); 
  6.  
  7. foreach ( $tags as $tag ) : 
  8. if ( $tag->user_id != $user_id ) 
  9. $other_tags[] = $tag; 
  10. endforeach; 
  11. return $other_tags;