小优化
This commit is contained in:
@@ -315,24 +315,15 @@ trait ScriptsPart1b {
|
||||
);
|
||||
}
|
||||
|
||||
// 关注脚本
|
||||
$follow_js_path = get_template_directory() . '/assets/js/follow.js';
|
||||
if (file_exists($follow_js_path)) {
|
||||
wp_enqueue_script(
|
||||
'aksrt-follow',
|
||||
$base_uri . '/assets/js/follow.js',
|
||||
['aksrt-notyf'],
|
||||
filemtime($follow_js_path) ?: $version,
|
||||
true
|
||||
);
|
||||
}
|
||||
// 关注脚本已在全局栈注册(ScriptsPart1c),data-aksrt-follow 按钮
|
||||
// 也渲染于文章页作者栏与各处用户卡片,不能仅限本路由加载。
|
||||
|
||||
$author_js_path = get_template_directory() . '/assets/js/author.js';
|
||||
if (file_exists($author_js_path)) {
|
||||
wp_enqueue_script(
|
||||
'aksrt-author',
|
||||
$base_uri . '/assets/js/author.js',
|
||||
['loader_js'],
|
||||
['loader_js', 'aksrt-notyf'],
|
||||
(string) filemtime($author_js_path),
|
||||
true
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user