diff --git a/includes/core/class-access.php b/includes/core/class-access.php index d8a29050..1e31bc92 100644 --- a/includes/core/class-access.php +++ b/includes/core/class-access.php @@ -1118,7 +1118,7 @@ if ( ! class_exists( 'um\core\Access' ) ) { // if individual restriction is enabled then get post terms restriction settings $content_restriction = $this->get_post_privacy_settings( $post ); - if ( false === $in_query || ! empty( $content_restriction['_um_access_hide_from_queries'] ) ) { + if ( ! empty( $content_restriction['_um_custom_access_settings'] ) && ( false === $in_query || ! empty( $content_restriction['_um_access_hide_from_queries'] ) ) ) { if ( $this->is_restricted( $post ) ) { array_push( $exclude_posts, $post ); } @@ -1138,7 +1138,7 @@ if ( ! class_exists( 'um\core\Access' ) ) { $meta_value = maybe_unserialize( $term['meta_value'] ); - if ( false === $in_query || ( ! empty( $meta_value['_um_custom_access_settings'] ) && ! empty( $meta_value['_um_access_hide_from_queries'] ) ) ) { + if ( ! empty( $meta_value['_um_custom_access_settings'] ) && ( false === $in_query || ! empty( $meta_value['_um_access_hide_from_queries'] ) ) ) { $posts = get_posts( array( 'fields' => 'ids', diff --git a/readme.txt b/readme.txt index ad5893a2..ddf0577a 100644 --- a/readme.txt +++ b/readme.txt @@ -155,11 +155,12 @@ The plugin works with popular caching plugins by automatically excluding Ultimat * To learn more about version 2.1 please see this [docs](https://docs.ultimatemember.com/article/1512-upgrade-2-1-0) * UM2.1+ is a significant update to the Member Directories' code base from 2.0.x. Please make sure you take a full-site backup with restore point before updating the plugin -= 2.2.1: July 22, 2021 = += 2.2.1: July 26, 2021 = * Bugfixes: - Fixed: Sanitizing `max-width` value of the Login/Registration/Profile form settings - Fixed: Sanitizing `in_group` field's data + - Fixed: Restriction settings related with `Hide in queries` = 2.2.0: July 20, 2021 =