bb_get_forum_posts_rss_link

The BuddyPress bb get forum posts rss link function.

Description

bb_get_forum_posts_rss_link( (int) $forum_id = 0, (int) $context = 0 ); 

Parameters (2)

0. $forum_id — Optional. (int)
The forum id.
1. $context — Optional. (int)
The context.

Usage

  1. if ( !function_exists( 'bb_get_forum_posts_rss_link' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-template.php'; 
  3.  
  4. // The forum id. 
  5. $forum_id = -1; 
  6.  
  7. // The context. 
  8. $context = -1; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bb_get_forum_posts_rss_link($forum_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_forum_posts_rss_link( $forum_id = 0, $context = 0 ) { 
  2. $forum = bb_get_forum( get_forum_id( $forum_id ) ); 
  3.  
  4. if (!$context || !is_integer($context)) { 
  5.  
  6. $rewrite = bb_get_option( 'mod_rewrite' ); 
  7. if ( $rewrite ) { 
  8. if ( $rewrite === 'slugs' ) { 
  9. $column = 'forum_slug'; 
  10. } else { 
  11. $column = 'forum_id'; 
  12. $link = bb_get_uri('rss/forum/' . $forum->$column, null, $context); 
  13. } else { 
  14. $link = bb_get_uri('rss.php', array('forum' => $forum->forum_id), $context); 
  15. return apply_filters( 'bb_get_forum_posts_rss_link', $link, $forum->forum_id, $context );