bbp_topic_permalink

Output the link to the topic in the topic loop.

Description

bbp_topic_permalink( (int) $topic_id = 0, (string) $redirect_to = '' ); 

Parameters (2)

0. $topic_id — Optional. (int)
Topic id
1. $redirect_to — Optional. (string) => ''
$redirect_to Optional. Pass a redirect value for use with shortcodes and other fun things.

Usage

  1. if ( !function_exists( 'bbp_topic_permalink' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/topics/template.php'; 
  3.  
  4. // Optional. Topic id 
  5. $topic_id = -1; 
  6.  
  7. // $redirect_to Optional. Pass a redirect value for use with 
  8. // shortcodes and other fun things. 
  9. $redirect_to = ''; 
  10.  
  11. // NOTICE! Understand what this does before running. 
  12. $result = bbp_topic_permalink($topic_id, $redirect_to); 
  13.  

Defined (1)

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

/includes/topics/template.php  
  1. function bbp_topic_permalink( $topic_id = 0, $redirect_to = '' ) { 
  2. echo esc_url( bbp_get_topic_permalink( $topic_id, $redirect_to ) );