- fixed 404 for attachments;

This commit is contained in:
Nikita Sinelnikov
2021-08-05 19:16:10 +03:00
parent 290c3ad662
commit 2d250cb6ee
+1 -1
View File
@@ -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)";