Enqueue WordPress Comment Reply Script
This commit is contained in:
@@ -36,6 +36,11 @@ add_action( 'after_setup_theme', 'c1024_2026_setup' );
|
|||||||
function c1024_2026_assets() {
|
function c1024_2026_assets() {
|
||||||
wp_enqueue_style( 'c1024-2026-style', get_stylesheet_uri(), array(), '1.0.0' );
|
wp_enqueue_style( 'c1024-2026-style', get_stylesheet_uri(), array(), '1.0.0' );
|
||||||
wp_enqueue_script( 'c1024-2026-theme', get_template_directory_uri() . '/assets/js/theme.js', array(), '1.0.0', true );
|
wp_enqueue_script( 'c1024-2026-theme', get_template_directory_uri() . '/assets/js/theme.js', array(), '1.0.0', true );
|
||||||
|
|
||||||
|
// Core moves and focuses the reply form and sets its parent comment ID.
|
||||||
|
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
|
||||||
|
wp_enqueue_script( 'comment-reply' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Load public assets through WordPress so dependencies and plugin integrations remain ordered.
|
// Load public assets through WordPress so dependencies and plugin integrations remain ordered.
|
||||||
add_action( 'wp_enqueue_scripts', 'c1024_2026_assets' );
|
add_action( 'wp_enqueue_scripts', 'c1024_2026_assets' );
|
||||||
|
|||||||
Reference in New Issue
Block a user