fix 更多栏目

This commit is contained in:
2026-09-05 17:32:18 +08:00
parent 5b89fc200b
commit 05a6b6fc54
28 changed files with 440 additions and 2295 deletions
+3 -11
View File
@@ -175,10 +175,6 @@ class HomeCms {
return $settings['home_list1_orderby_option']['lists'][0] ?? 'modified';
}
public static function homepage_sticky_tabs_enabled(): bool {
return true;
}
public static function home_posts_list_enabled(): bool {
$settings = self::get_homepage_fixed_settings();
return !empty($settings['home_posts_list_s']);
@@ -214,10 +210,6 @@ class HomeCms {
return $settings['home_exclude_cats'];
}
public static function homepage_tab_posts_per_page(): int {
return 6;
}
public static function get_paid_content_settings(): array {
return PaymentRuntime::get_paid_content_settings();
}
@@ -299,9 +291,9 @@ class HomeCms {
continue;
}
$orderby = sanitize_key($tab['orderby'] ?? 'modified');
if (!in_array($orderby, $allowed_orderby, true)) {
$orderby = 'modified';
$orderby = sanitize_key((string) ($tab['orderby'] ?? ''));
if ($orderby !== '' && !in_array($orderby, $allowed_orderby, true)) {
$orderby = '';
}
$tabs[] = [