diff --git a/includes/core/class-access.php b/includes/core/class-access.php index 2daf2ca9..7cd83a85 100644 --- a/includes/core/class-access.php +++ b/includes/core/class-access.php @@ -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; } diff --git a/includes/core/class-query.php b/includes/core/class-query.php index 9a3d9f1d..e0f963f4 100644 --- a/includes/core/class-query.php +++ b/includes/core/class-query.php @@ -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; } - } /***