fix 更多栏目
This commit is contained in:
1 parent
5b89fc200b
commit
05a6b6fc54
28 files changed
+440
-2295
No files matched your search
@@ -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[] = [
|
||||
|
||||
@@ -68,13 +68,6 @@ trait HomepageReader {
|
||||
return HomeCms::homepage_default_sort();
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the homepage tabs should use sticky/affix behaviour.
|
||||
*/
|
||||
public static function homepage_sticky_tabs_enabled(): bool {
|
||||
return HomeCms::homepage_sticky_tabs_enabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the main "latest posts" list is enabled on the homepage.
|
||||
*/
|
||||
@@ -130,13 +123,6 @@ trait HomepageReader {
|
||||
return HomeCms::home_exclude_category_ids();
|
||||
}
|
||||
|
||||
/**
|
||||
* Posts per page for each category tab.
|
||||
*/
|
||||
public static function homepage_tab_posts_per_page(): int {
|
||||
return HomeCms::homepage_tab_posts_per_page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取页脚配色配置
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user