From cc01ec2c506e901cc1a485c5ca92400ce920d738 Mon Sep 17 00:00:00 2001 From: Frescoref Date: Fri, 23 Jun 2023 15:00:56 +0300 Subject: [PATCH] Fix: more --- src/Manager.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Manager.php b/src/Manager.php index 45b3da6..07284f8 100644 --- a/src/Manager.php +++ b/src/Manager.php @@ -409,8 +409,8 @@ function dismissNotice(dismissElement) * * @return bool */ - public function is_users($args) - { + public function is_users($args): bool + { // If user ids is empty we want this shown on all users. if(!isset($args['user_ids'])) { @@ -420,7 +420,7 @@ public function is_users($args) /** * @var WP_User $current_user */ - $current_user = wp_get_current_user(); + $current_user = \wp_get_current_user(); // Per user if(!is_array($args['user_ids']) && $current_user->ID === $args['user_ids']) @@ -428,6 +428,11 @@ public function is_users($args) return true; } + if(!is_array($args['user_ids'])) + { + return false; + } + if(count($args['user_ids']) < 1) { return true;