feat(nav): deep-align menu_search panel, pill radius, senior media

- Layout-2 remote-box AJAX panel (history/hot/posts) via aksrt_menu_search
- Live suggestions for post/topic/product; local history for guests
- Publish radius switch (zibll bool pill) mapped to CSS radius class
- Senior menu editor: WP media library image picker
- Active menu underline + panel CSS; acceptance/contract updates
This commit is contained in:
kate522 committed 2026-07-22 12:51:56 +08:00
1 parent 2a11a889c3
commit 159a12c481
14 files changed
+494 -117

No files matched your search

+6 -2
View File
@@ -9,7 +9,7 @@ defined('ABSPATH') || exit;
if (!function_exists('aksrt_get_header_newposts_config')) :
/**
* @return array{enabled:bool,text:string,radius:int,class:string,types:string[]}
* @return array{enabled:bool,text:string,radius:int,radius_pill:bool,class:string,types:string[]}
*/
function aksrt_get_header_newposts_config(): array {
$cfg = class_exists('\AKSRT\Settings\Settings')
@@ -210,7 +210,11 @@ if (!function_exists('aksrt_render_header_menu_buttons')) :
$class .= ' ' . $cfg['class'];
}
$radius = (int) ($cfg['radius'] ?? 20);
// Radius applied via CSS class variable to avoid style attribute overriding flex.
$pill = !empty($cfg['radius_pill']) || $radius >= 16;
if ($pill && !str_contains($class, 'radius')) {
$class .= ' radius';
}
// Radius applied via CSS variable (zibll pill ≈ 20px when switch on).
$radius_attr = $radius > 0 ? ' data-radius="' . esc_attr((string) $radius) . '" style="--navbar-cta-radius:' . $radius . 'px"' : '';
$label = (string) ($cfg['text'] ?? __('发布', 'aksrt'));
$btn = aksrt_render_new_add_btns($cfg['types'] ?? ['post'], $class, $label);