[ad_1]
Plugin Author
Kento
(@proaktion)
Hi,
In your WP_Query make sure that suppress_filters is false (which it is by default so if you don’t pass that parameter it would be ok, using true however would prevent Groups from applying the restrictions).
In most cases, you probably wouldn’t need to use groups_filter_the_posts because it hooks into the posts_where filter to apply restrictions. However, if you still need it, you can enable it using the predefined __return_true() WordPress function with the filter:
add_filter( 'groups_filter_the_posts', '__return_true' );But you should make sure that this only applies when it is really needed, to avoid any processing overhead it would create otherwise.
Cheers
