From cf2a2ea55fd97544cbf3a0f7897a1cb303d31cef Mon Sep 17 00:00:00 2001 From: Vinod Dalvi Date: Wed, 28 Jun 2017 17:25:26 +0530 Subject: [PATCH] Changed get_template_directory_uri function with get_theme_file_uri - #1141 --- functions.php | 4 ++-- inc/customizer.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/functions.php b/functions.php index c68a5f5250..166b09fb9e 100644 --- a/functions.php +++ b/functions.php @@ -107,9 +107,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 c9c55776bd..04ca3c46c0 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -21,6 +21,6 @@ function _s_customize_register( $wp_customize ) { * 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' );