diff --git a/src/AKSRT/User/Home.php b/src/AKSRT/User/Home.php index 64a42082..808d8810 100644 --- a/src/AKSRT/User/Home.php +++ b/src/AKSRT/User/Home.php @@ -143,7 +143,15 @@ class Home { $application = class_exists('AKSRT\\User\\AuthApply') ? AuthApply::get_apply_payload($user_id) : []; $type = sanitize_key((string) ($info['type'] ?? $application['type'] ?? '')); $type_settings = is_array($settings['verify']['types'][$type] ?? null) ? $settings['verify']['types'][$type] : []; - $label = (string) ($type_settings['badge_text'] ?? $type_settings['label'] ?? ''); + $label = trim((string) ($type_settings['badge_text'] ?? $type_settings['label'] ?? '')); + if ($label === '') { + foreach ((array) ($settings['verify']['types'] ?? []) as $configured_type) { + if (is_array($configured_type) && !empty($configured_type['badge_text'])) { + $label = trim((string) $configured_type['badge_text']); + break; + } + } + } $signals[] = [ 'type' => 'verify', 'label' => $label,