bpbbpst_topic_is_single

Removes the filter to the_title to avoid the support mention to be added in the_content.

Description

(array) bpbbpst_topic_is_single( (array) $templates = array(), (string) $slug = '', (string) $name = '' ); 

Returns (array)

$templates unchanged

Parameters (3)

0. $templates — Optional. (array) => array()
The hierarchy of bbPress templates
1. $slug — Optional. (string) => ''
The slug template part
2. $name — Optional. (string) => ''
The optionnal template part

Usage

  1. if ( !function_exists( 'bpbbpst_topic_is_single' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddy-bbpress-support-topic/includes/functions.php'; 
  3.  
  4. // the hierarchy of bbPress templates 
  5. $templates = array(); 
  6.  
  7. // the slug template part 
  8. $slug = ''; 
  9.  
  10. // the optionnal template part 
  11. $name = ''; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = bpbbpst_topic_is_single($templates, $slug, $name); 
  15.  

Defined (1)

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

/includes/functions.php  
  1. function bpbbpst_topic_is_single( $templates = array(), $slug = '', $name = '' ) { 
  2.  
  3. if ( in_array( $name, array( 'single-topic', 'topic' ) ) ) { 
  4. remove_filter( 'the_title', 'bpbbpst_change_topic_title', 99 ); 
  5.  
  6. return $templates;