/home/techb158/public_html/wp-content/plugins/kirki/app/Supports
NameSizeModeActions
Facades/-0755rm
Form/-0755rm
ActionHooks.php4050644editdlrm
Canvas.php5810644editdlrm
CollectionItem.php42120644editdlrm
ContentManager.php24480644editdlrm
DateTime.php5560644editdlrm
EditorPreview.php9920644editdlrm
FileHandler.php43950644editdlrm
FilterHooks.php8140644editdlrm
PageUrl.php59900644editdlrm
Recaptcha.php26980644editdlrm
Role.php14710644editdlrm
Session.php29690644editdlrm
Template.php122870644editdlrm
Edit: /home/techb158/public_html/wp-content/plugins/kirki/app/Supports/Role.php (1471B)
roles) ? array_keys($wp_roles->roles) : []; } /** * Get all the access levels by roles * * @param array $roles * * @return array */ public static function get_access_levels_by_roles(array $roles) { $all_accesses = []; $option_keys = collection($roles)->map(fn($role) => with_prefix($role))->to_array(); $options = Option::get($option_keys, [], false); foreach ($roles as $role) { $prefixed_role = with_prefix($role); if (in_array($role, AccessLevels::USERS_DEFAULT_FULL_ACCESS, true)) { $all_accesses[$role] = AccessLevels::FULL_ACCESS; } if (!empty($options[$prefixed_role])) { $all_accesses[$role] = $options[$prefixed_role]; } } return $all_accesses; } public static function get_roles_by_levels($levels) { $all_roles = static::get_all(); $roles_with_levels = static::get_access_levels_by_roles($all_roles); return array_keys(collection($roles_with_levels) ->filter(fn($level, $role) => in_array($level, $levels, true)) ->all()); } }