From e8cf58072f6a95f623632154aa8b21379f0bd229 Mon Sep 17 00:00:00 2001 From: Jami Gibbs Date: Mon, 21 Nov 2016 15:49:52 -0600 Subject: [PATCH] Adding theme ver to script load for cachheing --- functions.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/functions.php b/functions.php index 02d4b9c..b3b1805 100644 --- a/functions.php +++ b/functions.php @@ -126,9 +126,14 @@ function scribe_widgets_init() { * Enqueue scripts. */ function scribe_scripts() { - + + /** + * Get the theme's version number for cache busting + */ + $scribe_theme = wp_get_theme(); + wp_enqueue_script( 'scribe-foundation-core', get_template_directory_uri() . '/vendor/foundation/foundation.js', array('jquery'), '6.2.2', false); - wp_enqueue_script( 'scribe-app', get_template_directory_uri() . '/js/app.js', array('jquery'), '1.0.0', true); + wp_enqueue_script( 'scribe-app', get_template_directory_uri() . '/js/app.js', array('jquery'), $scribe_theme['Version'], true); wp_enqueue_script( 'scribe-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );