Ticket #3334: 3334.02.patch
File 3334.02.patch, 749 bytes (added by , 4 years ago) |
---|
-
src/includes/common/template.php
1101 1101 * @return bool In a bbPress page 1102 1102 */ 1103 1103 function is_bbpress() { 1104 global $wp_query; 1104 1105 1105 // Defa lt to false1106 // Default to false 1106 1107 $retval = false; 1107 1108 1109 // Main query must be set before using this function. 1110 if ( ! isset( $wp_query ) ) { 1111 _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.', 'bbpress' ), '2.7.0' ); 1112 return $retval; 1113 } 1114 1108 1115 /** Archives **************************************************************/ 1109 1116 1110 1117 if ( bbp_is_forum_archive() ) {