diff --git a/functions.php b/functions.php index 4c52b386e4..34993bde03 100644 --- a/functions.php +++ b/functions.php @@ -119,9 +119,9 @@ function _s_widgets_init() { function _s_scripts() { wp_enqueue_style( '_s-style', get_stylesheet_uri() ); - wp_enqueue_script( '_s-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true ); + wp_enqueue_script( '_s-navigation', get_theme_file_uri( '/js/navigation.js' ), array(), '20151215', true ); - wp_enqueue_script( '_s-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true ); + wp_enqueue_script( '_s-skip-link-focus-fix', get_theme_file_uri( '/js/skip-link-focus-fix.js' ), array(), '20151215', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); diff --git a/inc/customizer.php b/inc/customizer.php index 783d9551b4..e5a0d6ff32 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -50,6 +50,6 @@ function _s_customize_partial_blogdescription() { * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function _s_customize_preview_js() { - wp_enqueue_script( '_s_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20151215', true ); + wp_enqueue_script( '_s_customizer', get_theme_file_uri( '/js/customizer.js' ), array( 'customize-preview' ), '20151215', true ); } add_action( 'customize_preview_init', '_s_customize_preview_js' );