- fixed profile form nonce;

- fixed profile form getting ID and data;
- fixed class-access.php when restricted taxonomies are disabled;
This commit is contained in:
Nikita Sinelnikov
2021-08-19 12:58:13 +03:00
parent 6e4ed30171
commit 5d773256b9
4 changed files with 32 additions and 12 deletions
+10 -8
View File
@@ -204,14 +204,14 @@ if ( ! class_exists( 'um\core\Access' ) ) {
}
}
$restricted_taxonomies = array_values( $restricted_taxonomies );
}
if ( ! empty( $post_types ) ) {
$taxonomies = array();
foreach ( $post_types as $p_t ) {
$taxonomies = array_merge( $taxonomies, get_object_taxonomies( $p_t ) );
if ( ! empty( $post_types ) ) {
$taxonomies = array();
foreach ( $post_types as $p_t ) {
$taxonomies = array_merge( $taxonomies, get_object_taxonomies( $p_t ) );
}
$restricted_taxonomies = array_intersect( $taxonomies, $restricted_taxonomies );
}
$restricted_taxonomies = array_intersect( $taxonomies, $restricted_taxonomies );
}
if ( ! empty( $restricted_taxonomies ) ) {
@@ -327,9 +327,11 @@ if ( ! class_exists( 'um\core\Access' ) ) {
}
}
$restricted_taxonomies = array_values( $restricted_taxonomies );
}
$restricted_taxonomies = array_intersect( $query->query_vars['taxonomy'], $restricted_taxonomies );
if ( ! empty( $restricted_taxonomies ) ) {
$restricted_taxonomies = array_intersect( $query->query_vars['taxonomy'], $restricted_taxonomies );
}
}
if ( empty( $restricted_taxonomies ) ) {
return $exclude;