Zibll 主线收口:统一 single 并清退 compat 资源路径
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -296,42 +296,6 @@ trait AKSRT_Scripts_Part_1b {
|
||||
);
|
||||
}
|
||||
|
||||
// 专题聚合页:路由专属 CSS
|
||||
if (is_page_template('templates/pages/page-special.php')) {
|
||||
wp_enqueue_style(
|
||||
'aksrt-route-special',
|
||||
$base_uri . '/assets/css/routes/special.css',
|
||||
['aksrt-tokens'],
|
||||
file_exists(get_template_directory() . '/assets/css/routes/special.css')
|
||||
? (string) filemtime(get_template_directory() . '/assets/css/routes/special.css')
|
||||
: $version
|
||||
);
|
||||
}
|
||||
|
||||
// 消息中心页
|
||||
if (is_page_template('templates/pages/page-messages.php')) {
|
||||
wp_enqueue_style(
|
||||
'aksrt-messages',
|
||||
$base_uri . '/assets/css/frontend/messages.css',
|
||||
['aksrt-tokens'],
|
||||
$version
|
||||
);
|
||||
wp_enqueue_script(
|
||||
'aksrt-messages',
|
||||
$base_uri . '/assets/js/messages.js',
|
||||
['aksrt-script'],
|
||||
$version,
|
||||
true
|
||||
);
|
||||
wp_enqueue_script(
|
||||
'aksrt-conversation',
|
||||
$base_uri . '/assets/js/conversation.js',
|
||||
['aksrt-script'],
|
||||
$version,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
// 订单中心页
|
||||
if (is_page_template('templates/pages/page-orders.php')) {
|
||||
wp_enqueue_style(
|
||||
@@ -494,8 +458,8 @@ trait AKSRT_Scripts_Part_1b {
|
||||
}
|
||||
}
|
||||
|
||||
// 前台投稿页面 — page-edit.js
|
||||
if (is_page_template('templates/pages/page-submit.php') || is_page_template('templates/pages/page-product-edit.php')) {
|
||||
// 商品编辑页共用 page-edit.js
|
||||
if (is_page_template('templates/pages/page-product-edit.php')) {
|
||||
$page_edit_js = get_template_directory() . '/assets/js/page-edit.js';
|
||||
if (file_exists($page_edit_js)) {
|
||||
wp_enqueue_script(
|
||||
@@ -1137,45 +1101,6 @@ trait AKSRT_Scripts_Part_1b {
|
||||
}
|
||||
|
||||
// Page navigation (TOC highlight, smooth scroll, doc search)
|
||||
if (is_page_template('templates/pages/page-documentnav.php') || is_singular()) {
|
||||
$page_navs_path = get_template_directory() . '/assets/js/page-navs.js';
|
||||
wp_enqueue_script(
|
||||
'aksrt-page-navs',
|
||||
$base_uri . '/assets/js/page-navs.js',
|
||||
['aksrt-script'],
|
||||
file_exists($page_navs_path) ? (string) filemtime($page_navs_path) : $version,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
// Docs navigation (collapsible tree, keyboard nav, sidebar search)
|
||||
if (is_page_template('templates/pages/page-documentnav.php')) {
|
||||
$docs_nav_path = get_template_directory() . '/assets/js/docs-navigation.js';
|
||||
if (file_exists($docs_nav_path)) {
|
||||
wp_enqueue_script(
|
||||
'aksrt-docs-navigation',
|
||||
$base_uri . '/assets/js/docs-navigation.js',
|
||||
['aksrt-script'],
|
||||
(string) filemtime($docs_nav_path),
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Download center page interactions
|
||||
if (is_page_template('templates/pages/page-download.php')) {
|
||||
$dl_status_path = get_template_directory() . '/assets/js/download-status.js';
|
||||
if (file_exists($dl_status_path)) {
|
||||
wp_enqueue_script(
|
||||
'aksrt-download-status',
|
||||
$base_uri . '/assets/js/download-status.js',
|
||||
['aksrt-script'],
|
||||
(string) filemtime($dl_status_path),
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// 评论回复脚本
|
||||
if (is_singular() && comments_open() && get_option('thread_comments')) {
|
||||
wp_enqueue_script('comment-reply');
|
||||
@@ -1241,10 +1166,8 @@ trait AKSRT_Scripts_Part_1b {
|
||||
'register' => function_exists('aksrt_get_register_url') ? aksrt_get_register_url() : wp_registration_url(),
|
||||
'resetPassword' => function_exists('aksrt_get_reset_password_url') ? aksrt_get_reset_password_url() : wp_lostpassword_url(),
|
||||
'profile' => function_exists('aksrt_get_user_center_url') ? aksrt_get_user_center_url() : home_url('/profile/'),
|
||||
'messages' => $runtime_routes['messages'],
|
||||
'cart' => $runtime_routes['cart'],
|
||||
'orders' => $runtime_routes['orders'],
|
||||
'download' => $runtime_routes['download'],
|
||||
'resources' => $runtime_routes['resources'],
|
||||
],
|
||||
'shell' => [
|
||||
|
||||
Reference in New Issue
Block a user