From 2d250cb6eebf3d567c900d3e098f80c8b4dc683d Mon Sep 17 00:00:00 2001 From: Nikita Sinelnikov Date: Thu, 5 Aug 2021 19:16:10 +0300 Subject: [PATCH] - fixed 404 for attachments; --- includes/core/class-access.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/class-access.php b/includes/core/class-access.php index df50d5a4..43f7ac18 100644 --- a/includes/core/class-access.php +++ b/includes/core/class-access.php @@ -126,7 +126,7 @@ if ( ! class_exists( 'um\core\Access' ) ) { if ( ! empty( $query->query_vars['p'] ) && $this->is_restricted( $query->query_vars['p'] ) ) { $restriction_settings = $this->get_post_privacy_settings( $query->query_vars['p'] ); - if ( empty( $restriction_settings['_um_access_hide_from_queries'] ) && $query->query_vars['post__not_in'] ) { + if ( ! empty( $restriction_settings['_um_access_hide_from_queries'] ) && ! empty( $query->query_vars['post__not_in'] ) ) { global $wpdb; $post__not_in = implode( ',', array_map( 'absint', $query->query_vars['post__not_in'] ) ); $where .= " AND {$wpdb->posts}.ID NOT IN ($post__not_in)";