feat(homepage): consume Zibll homepage keys on frontend queries

Point homepage getters and tab queries at home_lists / home_exclude_* /
index_list_title / list1 orderby. Support category+topics tab terms via
tax_query, expand the homepage term picker API, and keep facade method
names for existing templates without dual-writing storage keys.
This commit is contained in:
kate522 committed 2026-07-11 15:23:21 +08:00
1 parent 0c882d8887
commit f0f6e97d04
4 files changed
+76 -15

No files matched your search

@@ -266,7 +266,12 @@ class AKSRT_Settings_Home_Cms {
public static function homepage_tabs(): array {
$settings = self::get_homepage_fixed_settings();
return $settings['homepage_tabs'];
return $settings['home_lists'];
}
/** @return array<int, array{term_id:int,title:string,orderby:string,enabled:bool}> */
public static function home_lists(): array {
return self::homepage_tabs();
}
public static function homepage_card_style(): string {
@@ -291,7 +296,7 @@ class AKSRT_Settings_Home_Cms {
public static function homepage_default_sort(): string {
$settings = self::get_homepage_fixed_settings();
return $settings['homepage_default_sort'];
return $settings['home_list1_orderby_option']['orderby'] ?? 'modified';
}
public static function homepage_default_view(): string {
@@ -311,22 +316,22 @@ class AKSRT_Settings_Home_Cms {
public static function home_posts_list_enabled(): bool {
$settings = self::get_homepage_fixed_settings();
return !empty($settings['home_posts_list_enabled']);
return !empty($settings['home_posts_list_s']);
}
public static function home_list_title(): string {
$settings = self::get_homepage_fixed_settings();
return (string) $settings['home_list_title'];
return (string) $settings['index_list_title'];
}
public static function home_list_sort_enabled(): bool {
$settings = self::get_homepage_fixed_settings();
return !empty($settings['home_list_sort_enabled']);
return !empty($settings['home_list1_orderby_s']);
}
public static function home_list_sort_options(): array {
$settings = self::get_homepage_fixed_settings();
return $settings['home_list_sort_options'];
return $settings['home_list1_orderby_option']['options'] ?? ['modified', 'date', 'views', 'likes', 'comments'];
}
public static function home_list_sort_dropdown(): bool {
@@ -336,12 +341,12 @@ class AKSRT_Settings_Home_Cms {
public static function home_exclude_post_ids(): array {
$settings = self::get_homepage_fixed_settings();
return $settings['home_exclude_post_ids'];
return $settings['home_exclude_posts'];
}
public static function home_exclude_category_ids(): array {
$settings = self::get_homepage_fixed_settings();
return $settings['home_exclude_category_ids'];
return $settings['home_exclude_cats'];
}
public static function homepage_tab_posts_per_page(): int {