浏览代码

script version numbers tied to theme version

Maggie Cabrera 4 年之前
父节点
当前提交
1804b460e8
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      hever/inc/wpcom.php
  2. 1 1
      varia/functions.php

+ 1 - 1
hever/inc/wpcom.php

@@ -11,6 +11,6 @@ require_once get_template_directory() . '/inc/wpcom-colors-css-variables.php';
  * Bind JS handlers to instantly live-preview changes.
  */
 function hever_wpcom_color_annotations_preview_js() {
-	wp_enqueue_script( 'hever_wpcom_color_annotations_preview', get_template_directory_uri() . '/inc/color-annotations-preview.js', array( 'customize-preview' ), '1.0', true );
+	wp_enqueue_script( 'hever_wpcom_color_annotations_preview', get_template_directory_uri() . '/inc/color-annotations-preview.js', array( 'customize-preview' ), wp_get_theme()->get( 'Version' ), true );
 }
 add_action( 'customize_preview_init', 'hever_wpcom_color_annotations_preview_js' ); 

+ 1 - 1
varia/functions.php

@@ -293,7 +293,7 @@ function varia_scripts() {
 			'ie11-fix',
 			get_template_directory_uri() . '/js/ie11-fix.js',
 			array( 'css-vars-ponyfill' ),
-			'1.0'
+			wp_get_theme()->get( 'Version' )
 		);
 		wp_enqueue_style( 'varia-ie-styles', get_template_directory_uri() . '/ie.css', array(), wp_get_theme()->get( 'Version' ) );
 	}