fix(identity): align vip icons and sidebar cards

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Fable 5 committed 2026-08-11 18:52:12 +08:00
1 parent bac6b04839
commit ae2588c292
6 files changed
+51 -43

No files matched your search

+8 -3
View File
@@ -54,6 +54,11 @@ if (!function_exists('aksrt_render_user_identity_chips')) {
}
}
$signals = aksrt_get_user_identity_signals($user_id);
// Keep the public identity order stable: certification, worn badge, level.
usort($signals, static function (array $left, array $right): int {
$priority = ['verify' => 0, 'badge' => 1, 'level' => 2];
return ($priority[(string) ($left['type'] ?? '')] ?? 3) <=> ($priority[(string) ($right['type'] ?? '')] ?? 3);
});
// Comments stay compact; author/card can show more.
$limit = $context === 'comment' ? 3 : 6;
$n = 0;
@@ -116,7 +121,7 @@ if (!function_exists('aksrt_get_user_name')) {
'id' => 0,
'class' => 'flex ac flex1',
'name_class' => '',
'vip' => false,
'vip' => true,
'medal' => true,
'auth' => true,
'level' => true,
@@ -148,7 +153,7 @@ if (!function_exists('aksrt_get_user_name')) {
$vip_html = (string) aksrt_render_vip_badge($user_id, 'sm');
}
$name_class = trim('display-name text-ellipsis ' . (string) $args['name_class']);
$name_link = '<a class="' . esc_attr($name_class) . '" href="' . esc_url($home) . '">' . $vip_html . esc_html($display) . '</a>';
$name_link = '<a class="' . esc_attr($name_class) . '" href="' . esc_url($home) . '">' . esc_html($display) . '</a>';
$auth_html = '';
$medal_html = '';
@@ -217,7 +222,7 @@ if (!function_exists('aksrt_get_user_name')) {
}
// Order: name → auth → wear medal → level → follow (Zibll).
$html = '<name class="' . esc_attr((string) $args['class']) . '">' . $name_link . $auth_html . $medal_html . $level_html . $follow_html . '</name>';
$html = '<name class="' . esc_attr((string) $args['class']) . '">' . $name_link . $vip_html . $auth_html . $medal_html . $level_html . $follow_html . '</name>';
/**
* Filter rendered user name chrome.
*