134 lines
3.2 KiB
PHP
134 lines
3.2 KiB
PHP
<?php
|
|
/**
|
|
* @package AKSRT
|
|
*/
|
|
|
|
namespace AKSRT\Settings;
|
|
|
|
defined('ABSPATH') || exit;
|
|
|
|
trait HomepageReader {
|
|
|
|
/**
|
|
* Allowed sort/orderby values for the homepage.
|
|
*
|
|
* @return string[]
|
|
*/
|
|
public static function homepage_allowed_sorts(): array {
|
|
return HomeCms::homepage_allowed_sorts();
|
|
}
|
|
|
|
/**
|
|
* Full sort label map for admin UI and front-end rendering.
|
|
*
|
|
* @return array<string,string>
|
|
*/
|
|
public static function homepage_sort_labels(): array {
|
|
return HomeCms::homepage_sort_labels();
|
|
}
|
|
|
|
/**
|
|
* Fixed homepage visual settings.
|
|
*
|
|
* @return array<string,mixed>
|
|
*/
|
|
public static function get_homepage_fixed_settings(): array {
|
|
return HomeCms::get_homepage_fixed_settings();
|
|
}
|
|
|
|
/**
|
|
* Homepage always uses ordinary posts.
|
|
*
|
|
* @return string Always 'post'.
|
|
*/
|
|
public static function homepage_content_model(): string {
|
|
return HomeCms::homepage_content_model();
|
|
}
|
|
|
|
/**
|
|
* Structured homepage tabs.
|
|
*
|
|
* @return array<int, array{term_id:int, title:string, orderby:string}>
|
|
*/
|
|
public static function homepage_tabs(): array {
|
|
return HomeCms::homepage_tabs();
|
|
}
|
|
|
|
/**
|
|
* Whether homepage sidebar widgets should use the compact mini list style.
|
|
*/
|
|
public static function homepage_sidebar_mini_enabled(): bool {
|
|
return HomeCms::homepage_sidebar_mini_enabled();
|
|
}
|
|
|
|
/**
|
|
* Default homepage sort mode when no query override is present.
|
|
*/
|
|
public static function homepage_default_sort(): string {
|
|
return HomeCms::homepage_default_sort();
|
|
}
|
|
|
|
/**
|
|
* Whether the main "latest posts" list is enabled on the homepage.
|
|
*/
|
|
public static function home_posts_list_enabled(): bool {
|
|
return HomeCms::home_posts_list_enabled();
|
|
}
|
|
|
|
/**
|
|
* Custom title for the main homepage list section.
|
|
*/
|
|
public static function home_list_title(): string {
|
|
return HomeCms::home_list_title();
|
|
}
|
|
|
|
/**
|
|
* Whether the sort bar is enabled for the main stream.
|
|
*/
|
|
public static function home_list_sort_enabled(): bool {
|
|
return HomeCms::home_list_sort_enabled();
|
|
}
|
|
|
|
/**
|
|
* Configured sort option keys for the main stream sort bar.
|
|
*
|
|
* @return string[]
|
|
*/
|
|
public static function home_list_sort_options(): array {
|
|
return HomeCms::home_list_sort_options();
|
|
}
|
|
|
|
/**
|
|
* Whether the sort bar uses a dropdown instead of inline links.
|
|
*/
|
|
public static function home_list_sort_dropdown(): bool {
|
|
return HomeCms::home_list_sort_dropdown();
|
|
}
|
|
|
|
/**
|
|
* Post IDs excluded from both main stream and tab queries.
|
|
*
|
|
* @return int[]
|
|
*/
|
|
public static function home_exclude_post_ids(): array {
|
|
return HomeCms::home_exclude_post_ids();
|
|
}
|
|
|
|
/**
|
|
* Category IDs excluded from the main stream.
|
|
*
|
|
* @return int[]
|
|
*/
|
|
public static function home_exclude_category_ids(): array {
|
|
return HomeCms::home_exclude_category_ids();
|
|
}
|
|
|
|
/**
|
|
* 获取页脚配色配置
|
|
*/
|
|
public static function get_footer_theme_config(): array {
|
|
return HomeCms::get_footer_theme_config();
|
|
}
|
|
|
|
}
|