mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- fixed notices if there aren't restricted post types;
This commit is contained in:
@@ -166,9 +166,11 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
||||
}
|
||||
} else {
|
||||
$restricted_posts = UM()->options()->get( 'restricted_access_post_metabox' );
|
||||
$restricted_posts = array_keys( $restricted_posts );
|
||||
if ( ! empty( $post_types ) ) {
|
||||
$restricted_posts = array_intersect( $post_types, $restricted_posts );
|
||||
if ( ! empty( $restricted_posts ) ) {
|
||||
$restricted_posts = array_keys( $restricted_posts );
|
||||
if ( ! empty( $post_types ) ) {
|
||||
$restricted_posts = array_intersect( $post_types, $restricted_posts );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $restricted_posts ) ) {
|
||||
@@ -812,6 +814,9 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
||||
global $wp_taxonomies;
|
||||
|
||||
$restricted_posts = UM()->options()->get( 'restricted_access_post_metabox' );
|
||||
if ( empty( $restricted_posts ) ) {
|
||||
$restricted_posts = array();
|
||||
}
|
||||
$restricted_posts = array_keys( $restricted_posts );
|
||||
|
||||
$restricted_taxonomies = UM()->options()->get( 'restricted_access_taxonomy_metabox' );
|
||||
|
||||
Reference in New Issue
Block a user