- added 404 trigger on categories pages when user logged in with another access role;

This commit is contained in:
nikitozzzzzzz
2017-11-23 22:16:12 +02:00
parent 83c2c6590e
commit 4aab809a3d
+6
View File
@@ -132,6 +132,12 @@ if ( ! class_exists( 'Access' ) ) {
if ( isset( $user_can ) && $user_can && $custom_restrict ) {
$this->allow_access = true;
return;
} else {
//restrict terms page by 404 for logged in users with wrong role
global $wp_query;
$wp_query->set_404();
status_header( 404 );
nocache_headers();
}
}
}