fix(nav): header publish menu + userbox card polish

Unpaint multi-type 发布 wrapper, fix light-menu ink, avatar unread
dot clipping, check-in REST double namespace, and user-card VIP/check-in layout.
This commit is contained in:
2026-07-22 08:49:27 +08:00
parent df2874698c
commit 77164fee45
9 changed files with 126 additions and 38 deletions
+22 -4
View File
@@ -157,18 +157,36 @@ if (!function_exists('aksrt_render_new_add_btns')) :
$label = __('发布', 'aksrt');
}
$label_html = aksrt_normalize_header_cta_label((string) $label, 'fas fa-pen');
$class = trim('newadd-btns ' . $class);
// Keep CTA paint classes (e.g. btn-primary) off multi-type wrapper so the
// dropdown plate is not filled pink/primary; apply them on the toggle only.
$class_tokens = preg_split('/\s+/', trim($class), -1, PREG_SPLIT_NO_EMPTY) ?: [];
$cta_tokens = [];
$wrap_tokens = ['newadd-btns'];
foreach ($class_tokens as $token) {
if ($token === 'newadd-btns') {
continue;
}
if ($token === 'btn-primary' || $token === 'but' || $token === 'navbar-cta') {
$cta_tokens[] = $token;
continue;
}
$wrap_tokens[] = $token;
}
if (!in_array('btn-primary', $cta_tokens, true)) {
$cta_tokens[] = 'btn-primary';
}
$cta_class = trim(implode(' ', array_unique($cta_tokens)));
if (count($actions) === 1) {
$a = $actions[0];
// Prefer configured label; icon already embedded after normalize.
return '<a rel="nofollow" class="' . esc_attr(trim($class . ' but navbar-cta')) . '" href="' . esc_url($a['url']) . '">'
return '<a rel="nofollow" class="' . esc_attr(trim(implode(' ', $wrap_tokens) . ' ' . $cta_class . ' but navbar-cta')) . '" href="' . esc_url($a['url']) . '">'
. $label_html
. '</a>';
}
$html = '<span class="' . esc_attr($class . ' hover-show') . '">';
$html .= '<a href="javascript:;" class="but newadd-btns__toggle navbar-cta" rel="nofollow">'
$html = '<span class="' . esc_attr(trim(implode(' ', $wrap_tokens) . ' hover-show')) . '">';
$html .= '<a href="javascript:;" class="' . esc_attr(trim('but newadd-btns__toggle navbar-cta ' . $cta_class)) . '" rel="nofollow">'
. $label_html
. ' <i class="fas fa-caret-down" aria-hidden="true"></i></a>';
$html .= '<div class="hover-show-con dropdown-menu drop-newadd">';