bbp_is_topic_tag

Check if the current page is a topic tag.

Description

bbp_is_topic_tag(); 

Usage

  1. if ( !function_exists( 'bbp_is_topic_tag' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/common/template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bbp_is_topic_tag(); 
  7.  

Defined (1)

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

/includes/common/template.php  
  1. function bbp_is_topic_tag() { 
  2.  
  3. // Bail if topic-tags are off 
  4. if ( ! bbp_allow_topic_tags() ) 
  5. return false; 
  6.  
  7. // Return false if editing a topic tag 
  8. return false; 
  9.  
  10. // Assume false 
  11. $retval = false; 
  12.  
  13. // Check tax and query vars 
  14. if ( is_tax( bbp_get_topic_tag_tax_id() ) || !empty(bbpress)->topic_query->is_tax ) || get_query_var( 'bbp_topic_tag' ) ) 
  15. $retval = true; 
  16.  
  17. return (bool) apply_filters( 'bbp_is_topic_tag', $retval );