fix(header): wire multi-function page-type enable like zibll
Connect header_components_show_on through aksrt_header_slide_is_show with zibll page-type matching, drop the homepage-only gate, align admin options, apply nav color, enqueue by is_show, remove dead float-btn schema, and consume footer_tabbar_single extend mode on post singles.
This commit is contained in:
1 parent
3e3a4631f0
commit
bfb64211ee
12 files changed
+445
-285
No files matched your search
@@ -51,7 +51,24 @@ trait AKSRT_Settings_Display_Page_Groups {
|
||||
*/
|
||||
public static function get_header_components_settings(): array {
|
||||
$s = self::get_all();
|
||||
$allowed_page_types = [
|
||||
'home',
|
||||
'topics',
|
||||
'category',
|
||||
'tag',
|
||||
'author',
|
||||
'single',
|
||||
'search',
|
||||
'forum_home',
|
||||
'forum_plate',
|
||||
'forum_post',
|
||||
'page',
|
||||
];
|
||||
$show_on = isset($s['header_components_show_on']) ? (array) $s['header_components_show_on'] : ['home'];
|
||||
$show_on = array_values(array_intersect(
|
||||
array_map('sanitize_key', $show_on),
|
||||
$allowed_page_types
|
||||
));
|
||||
$show_type = $s['header_components_device_visibility'] ?? '';
|
||||
if (!in_array($show_type, ['', 'only_pc', 'only_sm'], true)) {
|
||||
$show_type = '';
|
||||
@@ -60,7 +77,7 @@ trait AKSRT_Settings_Display_Page_Groups {
|
||||
'search_enabled' => self::header_components_search_enabled(),
|
||||
'search_config' => self::get_header_components_search_config(),
|
||||
'cards_enabled' => self::header_components_cards_enabled(),
|
||||
'show_on_pages' => array_values(array_filter(array_map('sanitize_key', $show_on))),
|
||||
'show_on_pages' => $show_on,
|
||||
'show_type' => $show_type,
|
||||
'filter_blur' => isset($s['header_components_filter_blur_devices']) ? array_values(array_intersect(array_map('sanitize_key', (array) $s['header_components_filter_blur_devices']), ['pc', 'mobile'])) : [],
|
||||
'card_show' => isset($s['header_components_card_show_devices']) ? array_values(array_intersect(array_map('sanitize_key', (array) $s['header_components_card_show_devices']), ['pc', 'mobile'])) : ['pc', 'mobile'],
|
||||
|
||||
Reference in new issue
Block a user