小优化
This commit is contained in:
@@ -164,6 +164,21 @@ trait ScriptsPart1c {
|
||||
);
|
||||
}
|
||||
|
||||
// Follow toggle: delegated [data-aksrt-follow] handler; the buttons render on
|
||||
// user home / user center / single author bar and user cards anywhere.
|
||||
// Depends on aksrt-runtime because aksrtData (REST root + nonce) is localized
|
||||
// onto that handle and follow.js reads it at parse time.
|
||||
$follow_js = get_template_directory() . '/assets/js/follow.js';
|
||||
if (file_exists($follow_js)) {
|
||||
wp_enqueue_script(
|
||||
'aksrt-follow',
|
||||
$base_uri . '/assets/js/follow.js',
|
||||
['aksrt-notyf', 'aksrt-runtime'],
|
||||
(string) filemtime($follow_js),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
// Core modules (split from main.js) — register with AksrtFrontend
|
||||
$core_modules = [
|
||||
'aksrt-core-article' => 'article.js',
|
||||
|
||||
Reference in New Issue
Block a user