refactor(resource): drop aksrt_resource CPT residue, post+meta only

This commit is contained in:
kate522 committed 2026-07-13 23:47:04 +08:00
1 parent 24c135aeec
commit 1af0e9b753
22 files changed
+362 -986

No files matched your search

+2 -13
View File
@@ -36,27 +36,16 @@ if (!function_exists('aksrt_homepage_get_current_page')) {
if (!function_exists('aksrt_homepage_get_post_types')) {
/**
* Homepage latest feed post types.
*
* Respects the homepage_content_model setting:
* - 'post': standard posts only (default)
* - 'mixed': posts + resource CPTs (explicit opt-in)
* Resources are ordinary posts with meta — always post.
*
* @return string[]
*/
function aksrt_homepage_get_post_types(): array {
// Default: plain posts only (zibll main-query feel). Mixed/resource is opt-in.
$content_model = class_exists('AKSRT_Settings')
? AKSRT_Settings::homepage_content_model()
: 'post';
if ($content_model === 'mixed' && function_exists('aksrt_resource_post_types')) {
return array_values(array_unique(aksrt_resource_post_types()));
}
return ['post'];
}
}
if (!function_exists('aksrt_homepage_get_tab_terms')) {
/**
* Homepage category tabs with full config.