bbp_topic_excerpt

Output the excerpt of the topic.

Description

bbp_topic_excerpt( (int) $topic_id = 0, (int) $length = 100 ); 

Parameters (2)

0. $topic_id — Optional. (int)
Topic id
1. $length — Optional. (int) => 100
Length of the excerpt. Defaults to 100 letters

Usage

  1. if ( !function_exists( 'bbp_topic_excerpt' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/topics/template.php'; 
  3.  
  4. // Optional. Topic id 
  5. $topic_id = -1; 
  6.  
  7. // Optional. Length of the excerpt. Defaults to 100 letters 
  8. $length = 100; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bbp_topic_excerpt($topic_id, $length); 
  12.  

Defined (1)

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

/includes/topics/template.php  
  1. function bbp_topic_excerpt( $topic_id = 0, $length = 100 ) { 
  2. echo bbp_get_topic_excerpt( $topic_id, $length );