feat(frontend): replace article system with Zibll 9.0
This commit is contained in:
@@ -1,44 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* AKSRT Flow Helper
|
||||
*
|
||||
* v4 起主题统一为 CMS / 资源站形态,不再提供 blog 形态分流。
|
||||
* 历史 helper 全部保留签名以保证兼容,但实际行为已收敛:
|
||||
*
|
||||
* aksrt_get_site_profile() 始终返回 'cms'
|
||||
* aksrt_get_term_flow() 始终返回 'inherit'(不再读取 term meta)
|
||||
* aksrt_is_resource_post() 仍按 _aksrt_is_resource meta 判定
|
||||
* aksrt_get_post_flow() 始终返回 'cms'
|
||||
* aksrt_is_cms_mode() 始终返回 true
|
||||
* aksrt_flow_layout_for() 始终返回 'grid-cms'
|
||||
* Resource-post predicate.
|
||||
*
|
||||
* @package AKSRT
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
if (!function_exists('aksrt_get_site_profile')) {
|
||||
/**
|
||||
* @deprecated v4 起恒为 'cms',保留仅为向后兼容。
|
||||
* @return string 'cms'
|
||||
*/
|
||||
function aksrt_get_site_profile(): string {
|
||||
return 'cms';
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('aksrt_get_term_flow')) {
|
||||
/**
|
||||
* @deprecated v4 起恒为 'inherit',term meta 不再生效。
|
||||
* @param int $term_id
|
||||
* @return string
|
||||
*/
|
||||
function aksrt_get_term_flow(int $term_id): string {
|
||||
unset($term_id);
|
||||
return 'inherit';
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('aksrt_is_resource_post')) {
|
||||
/**
|
||||
* 是否为资源帖:普通 post + _aksrt_is_resource meta。
|
||||
@@ -52,42 +20,5 @@ if (!function_exists('aksrt_is_resource_post')) {
|
||||
return false;
|
||||
}
|
||||
return (bool) get_post_meta($p->ID, '_aksrt_is_resource', true);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('aksrt_get_post_flow')) {
|
||||
/**
|
||||
* @deprecated v4 起恒为 'cms'。
|
||||
*
|
||||
* @param int|WP_Post|null $post
|
||||
* @return string 'cms'
|
||||
*/
|
||||
function aksrt_get_post_flow($post = null): string {
|
||||
unset($post);
|
||||
return 'cms';
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('aksrt_is_cms_mode')) {
|
||||
/**
|
||||
* 当前请求是否处在 CMS 形态。v4 起全站统一 CMS。
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function aksrt_is_cms_mode(): bool {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('aksrt_flow_layout_for')) {
|
||||
/**
|
||||
* @deprecated v4 起恒为 'grid-cms'。
|
||||
*
|
||||
* @param string $flow
|
||||
* @return string
|
||||
*/
|
||||
function aksrt_flow_layout_for(string $flow): string {
|
||||
unset($flow);
|
||||
return 'grid-cms';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user