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:
1 parent
2a11a889c3
commit
159a12c481
14 files changed
+494
-117
No files matched your search
@@ -69,13 +69,24 @@ trait FacadeBulk {
|
||||
$types = array_values(array_filter(array_map('sanitize_key', $s['header_newposts_types'])));
|
||||
}
|
||||
|
||||
// zibll nav_newposts_radius is bool pill; map true→20px, false→0. Legacy int still accepted once.
|
||||
$raw_radius = $s['header_newposts_radius'] ?? true;
|
||||
if (is_bool($raw_radius) || $raw_radius === '0' || $raw_radius === '1' || $raw_radius === 0 || $raw_radius === 1) {
|
||||
$radius_px = !empty($raw_radius) ? 20 : 0;
|
||||
$radius_pill = !empty($raw_radius);
|
||||
} else {
|
||||
$radius_px = max(0, min(30, (int) $raw_radius));
|
||||
$radius_pill = $radius_px >= 16;
|
||||
}
|
||||
|
||||
return [
|
||||
// Default on like zibll nav_newposts when key unset.
|
||||
'enabled' => !isset($s['header_newposts_enabled']) || !empty($s['header_newposts_enabled']),
|
||||
'text' => trim((string) ($s['header_newposts_text'] ?? '<i class="fa fa-pencil"></i> 发布')),
|
||||
'radius' => max(0, min(30, (int) ($s['header_newposts_radius'] ?? 20))),
|
||||
'class' => sanitize_html_class((string) ($s['header_newposts_class'] ?? '')),
|
||||
'types' => $types,
|
||||
'enabled' => !isset($s['header_newposts_enabled']) || !empty($s['header_newposts_enabled']),
|
||||
'text' => trim((string) ($s['header_newposts_text'] ?? '<i class="fa fa-pencil"></i> 发布')),
|
||||
'radius' => $radius_px,
|
||||
'radius_pill' => $radius_pill,
|
||||
'class' => sanitize_html_class((string) ($s['header_newposts_class'] ?? '')),
|
||||
'types' => $types,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user