diff --git a/assets/css/frontend/base.css b/assets/css/frontend/base.css index 6327b8f3..447a8bf3 100644 --- a/assets/css/frontend/base.css +++ b/assets/css/frontend/base.css @@ -172,7 +172,8 @@ main.container, * exceptions (UC level hero, admin column) override `height` per context. */ .aksrt-user-level-icon, -.aksrt-identity-medal { +.aksrt-identity-medal, +.aksrt-identity-certification-icon { display: inline-block; width: auto; height: 1.1em; diff --git a/src/AKSRT/User/Home.php b/src/AKSRT/User/Home.php index e951bbc1..172b346e 100644 --- a/src/AKSRT/User/Home.php +++ b/src/AKSRT/User/Home.php @@ -140,19 +140,18 @@ class Home { if (!empty($settings['verify']['enabled']) && !empty($settings['verify']['public_display']) && $this->is_user_verified($user_id, $settings['verify'])) { $info = class_exists('AKSRT\\User\\AuthApply') ? AuthApply::get_auth_info($user_id) : []; - $type = sanitize_key((string) ($info['type'] ?? '')); + $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] : []; - if ($type_settings !== []) { - $label = (string) $type_settings['badge_text']; - $signals[] = [ - 'type' => 'verify', - 'label' => $label, - 'title' => $label, - 'icon' => 'check-circle', - 'icon_url' => get_theme_file_uri('/assets/img/user/user-certification.svg'), - 'tone' => 'success', - ]; - } + $label = (string) ($type_settings['badge_text'] ?? $type_settings['label'] ?? __('认证用户', 'aksrt')); + $signals[] = [ + 'type' => 'verify', + 'label' => $label, + 'title' => $label, + 'icon' => 'check-circle', + 'icon_url' => get_theme_file_uri('/assets/img/user/user-certification.svg'), + 'tone' => 'success', + ]; } if (!empty($settings['level']['enabled']) && !empty($settings['level']['public_display'])) {