jenny-r
11/16/2018 - 3:52 PM

facetwp bbpress remove check for hiding topics

facetwp bbpress remove check for hiding topics

<?phhp
/** prevents bbpress from checking whether the current user should check current users forum visibility
 ** this will show all results regardless of whether a user has access to the topic
 ** be sure you really want to do this!!!
 **/
add_action( 'pre_get_posts', function( $query ) {
	if ( 'library' == FWP()->helper->get_uri() ) {
		remove_action( 'pre_get_posts', 'bbp_pre_get_posts_normalize_forum_visibility', 4 );
	}
}, 3 );