bb_get_tag_topics_rss_link

The BuddyPress bb get tag topics rss link function.

Description

bb_get_tag_topics_rss_link( (int) $tag_id = 0, (int) $context = 0 ); 

Parameters (2)

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

Usage

  1. if ( !function_exists( 'bb_get_tag_topics_rss_link' ) ) { 
  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. // The context. 
  8. $context = -1; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bb_get_tag_topics_rss_link($tag_id, $context); 
  12.  

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_topics_rss_link( $tag_id = 0, $context = 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. if ( !$context || !is_integer( $context ) ) { 
  16.  
  17. if ( bb_get_option( 'mod_rewrite' ) ) { 
  18. $link = bb_get_uri( 'rss/tags/' . $_tag->tag . '/topics', null, $context ); 
  19. } else { 
  20. $link = bb_get_uri( 'rss.php', array('tag' => $_tag->tag, 'topics' => 1 ), $context ); 
  21.  
  22. return apply_filters( 'get_tag_topics_rss_link', $link, $tag_id, $context );