Zibll 主线收口:统一 single 并清退 compat 资源路径

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
kate522andClaude committed 2026-07-09 20:30:49 +08:00
1 parent 0a6f97af21
commit 09f1eec909
26 files changed
+158 -1325

No files matched your search

+2 -30
View File
@@ -33,9 +33,9 @@ class AKSRT_Templates {
}
/**
* 主线页面模板:内容 / 用户 / 付费 / 论坛 / 商城主线可选模板。
* Selectable page templates shown in wp-admin for the rebuilt mainline.
*/
private function mainline_page_template_map(): array {
private function page_template_map(): array {
return [
'templates/pages/page-sign.php' => __('AKSRT - 登录/注册', 'aksrt'),
'templates/pages/page-profile.php' => __('AKSRT - 个人中心', 'aksrt'),
@@ -55,34 +55,6 @@ class AKSRT_Templates {
];
}
/**
* 兼容保留页面模板:非 Zibll 主线能力(文档模式、下载中心、专题、消息、投稿)。
*
* 这些模板文件与已分配它们的历史页面继续正常渲染(见 load_page_template()),
* 只是默认不再出现在 wp-admin 页面模板下拉中,避免污染主线内容心智。
* 站点可通过 aksrt_show_compat_page_templates() 重新暴露下拉选项。
*/
private function compat_page_template_map(): array {
return [
'templates/pages/page-special.php' => __('AKSRT - 专题聚合(兼容)', 'aksrt'),
'templates/pages/page-documentnav.php' => __('AKSRT - 文档导航(兼容)', 'aksrt'),
'templates/pages/page-messages.php' => __('AKSRT - 消息中心(兼容)', 'aksrt'),
'templates/pages/page-download.php' => __('AKSRT - 下载中心(兼容)', 'aksrt'),
'templates/pages/page-submit.php' => __('AKSRT - 前台投稿(兼容)', 'aksrt'),
];
}
private function page_template_map(): array {
$map = $this->mainline_page_template_map();
// 兼容页面模板默认隐藏出下拉;仅在站点显式开启时暴露。
if (function_exists('aksrt_show_compat_page_templates') && aksrt_show_compat_page_templates()) {
$map = array_merge($map, $this->compat_page_template_map());
}
return $map;
}
/**
* Register selectable page templates in wp-admin.
*/