mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- fixed bbPress reccursive cycle on WP_Query;
This commit is contained in:
@@ -371,10 +371,12 @@ if ( ! class_exists( 'Access' ) ) {
|
||||
return false;
|
||||
|
||||
//exlude from privacy UM default pages (except Members list and User(Profile) page)
|
||||
if ( um_is_core_post( $post, 'login' ) || um_is_core_post( $post, 'register' ) ||
|
||||
um_is_core_post( $post, 'account' ) || um_is_core_post( $post, 'logout' ) ||
|
||||
um_is_core_post( $post, 'password-reset' ) )
|
||||
return false;
|
||||
if ( ! empty( $post->post_type ) && $post->post_type == 'page' ) {
|
||||
if ( um_is_core_post( $post, 'login' ) || um_is_core_post( $post, 'register' ) ||
|
||||
um_is_core_post( $post, 'account' ) || um_is_core_post( $post, 'logout' ) ||
|
||||
um_is_core_post( $post, 'password-reset' ) )
|
||||
return false;
|
||||
}
|
||||
|
||||
$restricted_posts = um_get_option( 'restricted_access_post_metabox' );
|
||||
|
||||
@@ -444,7 +446,8 @@ if ( ! class_exists( 'Access' ) ) {
|
||||
//other filter
|
||||
foreach ( $posts as $post ) {
|
||||
$restriction = $this->get_post_privacy_settings( $post );
|
||||
if ( ! $restriction ) {
|
||||
|
||||
if ( ! $restriction ) {
|
||||
$filtered_posts[] = $post;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -108,13 +108,13 @@ if ( ! class_exists( 'Query' ) ) {
|
||||
return $comments;
|
||||
|
||||
} else {
|
||||
|
||||
$custom_posts = new \WP_Query();
|
||||
$args['post_status'] = explode( ',', $args['post_status'] );
|
||||
|
||||
$custom_posts->query( $args );
|
||||
return $custom_posts;
|
||||
|
||||
return $custom_posts;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
|
||||
Reference in New Issue
Block a user