is_bbpress

Use the above is_() functions to return if in any bbPress page.

Description

is_bbpress(); 

Usage

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

Defined (1)

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

/includes/common/template.php  
  1. function is_bbpress() { 
  2.  
  3. // Defalt to false 
  4. $retval = false; 
  5.  
  6. /** Archives **************************************************************/ 
  7.  
  8. if ( bbp_is_forum_archive() ) { 
  9. $retval = true; 
  10.  
  11. } elseif ( bbp_is_topic_archive() ) { 
  12. $retval = true; 
  13.  
  14. /** Topic Tags ************************************************************/ 
  15.  
  16. } elseif ( bbp_is_topic_tag() ) { 
  17. $retval = true; 
  18.  
  19. } elseif ( bbp_is_topic_tag_edit() ) { 
  20. $retval = true; 
  21.  
  22. /** Components ************************************************************/ 
  23.  
  24. } elseif ( bbp_is_single_forum() ) { 
  25. $retval = true; 
  26.  
  27. } elseif ( bbp_is_single_topic() ) { 
  28. $retval = true; 
  29.  
  30. } elseif ( bbp_is_single_reply() ) { 
  31. $retval = true; 
  32.  
  33. } elseif ( bbp_is_topic_edit() ) { 
  34. $retval = true; 
  35.  
  36. } elseif ( bbp_is_topic_merge() ) { 
  37. $retval = true; 
  38.  
  39. } elseif ( bbp_is_topic_split() ) { 
  40. $retval = true; 
  41.  
  42. } elseif ( bbp_is_reply_edit() ) { 
  43. $retval = true; 
  44.  
  45. } elseif ( bbp_is_reply_move() ) { 
  46. $retval = true; 
  47.  
  48. } elseif ( bbp_is_single_view() ) { 
  49. $retval = true; 
  50.  
  51. /** User ******************************************************************/ 
  52.  
  53. } elseif ( bbp_is_single_user_edit() ) { 
  54. $retval = true; 
  55.  
  56. } elseif ( bbp_is_single_user() ) { 
  57. $retval = true; 
  58.  
  59. } elseif ( bbp_is_user_home() ) { 
  60. $retval = true; 
  61.  
  62. } elseif ( bbp_is_user_home_edit() ) { 
  63. $retval = true; 
  64.  
  65. } elseif ( bbp_is_topics_created() ) { 
  66. $retval = true; 
  67.  
  68. } elseif ( bbp_is_favorites() ) { 
  69. $retval = true; 
  70.  
  71. } elseif ( bbp_is_subscriptions() ) { 
  72. $retval = true; 
  73.  
  74. /** Search ****************************************************************/ 
  75.  
  76. } elseif ( bbp_is_search() ) { 
  77. $retval = true; 
  78.  
  79. } elseif ( bbp_is_search_results() ) { 
  80. $retval = true; 
  81.  
  82. /** Done ******************************************************************/ 
  83.  
  84. return (bool) apply_filters( 'is_bbpress', $retval );