From 0d9ec05d2c6a0d217a8bf47bb7d7eeaa663f006b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 8 Aug 2019 01:28:26 +0000 Subject: [PATCH] Bundled Themes: Audit and update version numbers passed to `wp_enqueue_script()` to ensure proper cache busting. Props dswebsme, ianbelanger, justinahinon. Fixes #46981. git-svn-id: https://develop.svn.wordpress.org/trunk@45768 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentyeleven/header.php | 2 +- src/wp-content/themes/twentyeleven/inc/theme-options.php | 2 +- src/wp-content/themes/twentyeleven/showcase.php | 2 +- src/wp-content/themes/twentyfifteen/functions.php | 6 +++--- src/wp-content/themes/twentyfifteen/header.php | 2 +- src/wp-content/themes/twentyfourteen/functions.php | 6 +++--- src/wp-content/themes/twentyfourteen/header.php | 2 +- src/wp-content/themes/twentyfourteen/inc/customizer.php | 2 +- .../themes/twentyfourteen/inc/featured-content.php | 2 +- src/wp-content/themes/twentynineteen/functions.php | 4 ++-- src/wp-content/themes/twentynineteen/inc/customizer.php | 4 ++-- src/wp-content/themes/twentyseventeen/functions.php | 8 ++++---- src/wp-content/themes/twentyseventeen/inc/customizer.php | 4 ++-- src/wp-content/themes/twentysixteen/functions.php | 6 +++--- src/wp-content/themes/twentysixteen/inc/customizer.php | 4 ++-- src/wp-content/themes/twentythirteen/functions.php | 2 +- src/wp-content/themes/twentythirteen/header.php | 2 +- src/wp-content/themes/twentytwelve/functions.php | 2 +- src/wp-content/themes/twentytwelve/header.php | 2 +- 19 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/wp-content/themes/twentyeleven/header.php b/src/wp-content/themes/twentyeleven/header.php index e6ce35302d..bd67067950 100644 --- a/src/wp-content/themes/twentyeleven/header.php +++ b/src/wp-content/themes/twentyeleven/header.php @@ -52,7 +52,7 @@ if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) { diff --git a/src/wp-content/themes/twentyfifteen/functions.php b/src/wp-content/themes/twentyfifteen/functions.php index 77ec92b194..5b31066ee3 100644 --- a/src/wp-content/themes/twentyfifteen/functions.php +++ b/src/wp-content/themes/twentyfifteen/functions.php @@ -381,17 +381,17 @@ function twentyfifteen_scripts() { wp_enqueue_style( 'twentyfifteen-ie7', get_template_directory_uri() . '/css/ie7.css', array( 'twentyfifteen-style' ), '20141210' ); wp_style_add_data( 'twentyfifteen-ie7', 'conditional', 'lt IE 8' ); - wp_enqueue_script( 'twentyfifteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20141010', true ); + wp_enqueue_script( 'twentyfifteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20141028', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } if ( is_singular() && wp_attachment_is_image() ) { - wp_enqueue_script( 'twentyfifteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20141010' ); + wp_enqueue_script( 'twentyfifteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20141210' ); } - wp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150330', true ); + wp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20171218', true ); wp_localize_script( 'twentyfifteen-script', 'screenReaderText', diff --git a/src/wp-content/themes/twentyfifteen/header.php b/src/wp-content/themes/twentyfifteen/header.php index 41a1e8df7f..5ad5051877 100644 --- a/src/wp-content/themes/twentyfifteen/header.php +++ b/src/wp-content/themes/twentyfifteen/header.php @@ -16,7 +16,7 @@ diff --git a/src/wp-content/themes/twentyfourteen/functions.php b/src/wp-content/themes/twentyfourteen/functions.php index afed98fafc..74e3648d9d 100644 --- a/src/wp-content/themes/twentyfourteen/functions.php +++ b/src/wp-content/themes/twentyfourteen/functions.php @@ -331,7 +331,7 @@ function twentyfourteen_scripts() { } if ( is_singular() && wp_attachment_is_image() ) { - wp_enqueue_script( 'twentyfourteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20130402' ); + wp_enqueue_script( 'twentyfourteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20150120' ); } if ( is_active_sidebar( 'sidebar-3' ) ) { @@ -339,7 +339,7 @@ function twentyfourteen_scripts() { } if ( is_front_page() && 'slider' == get_theme_mod( 'featured_content_layout' ) ) { - wp_enqueue_script( 'twentyfourteen-slider', get_template_directory_uri() . '/js/slider.js', array( 'jquery' ), '20131205', true ); + wp_enqueue_script( 'twentyfourteen-slider', get_template_directory_uri() . '/js/slider.js', array( 'jquery' ), '20150120', true ); wp_localize_script( 'twentyfourteen-slider', 'featuredSliderDefaults', @@ -350,7 +350,7 @@ function twentyfourteen_scripts() { ); } - wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150315', true ); + wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20171218', true ); } add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' ); diff --git a/src/wp-content/themes/twentyfourteen/header.php b/src/wp-content/themes/twentyfourteen/header.php index 88071ec9b9..21d1a546cb 100644 --- a/src/wp-content/themes/twentyfourteen/header.php +++ b/src/wp-content/themes/twentyfourteen/header.php @@ -25,7 +25,7 @@ diff --git a/src/wp-content/themes/twentyfourteen/inc/customizer.php b/src/wp-content/themes/twentyfourteen/inc/customizer.php index ce35eafa3a..5172f9a8bd 100644 --- a/src/wp-content/themes/twentyfourteen/inc/customizer.php +++ b/src/wp-content/themes/twentyfourteen/inc/customizer.php @@ -140,7 +140,7 @@ function twentyfourteen_sanitize_layout( $layout ) { * @since Twenty Fourteen 1.0 */ function twentyfourteen_customize_preview_js() { - wp_enqueue_script( 'twentyfourteen_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20131205', true ); + wp_enqueue_script( 'twentyfourteen_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20141015', true ); } add_action( 'customize_preview_init', 'twentyfourteen_customize_preview_js' ); diff --git a/src/wp-content/themes/twentyfourteen/inc/featured-content.php b/src/wp-content/themes/twentyfourteen/inc/featured-content.php index 633b709017..fecfde4fc9 100644 --- a/src/wp-content/themes/twentyfourteen/inc/featured-content.php +++ b/src/wp-content/themes/twentyfourteen/inc/featured-content.php @@ -434,7 +434,7 @@ class Featured_Content { * @since Twenty Fourteen 1.0 */ public static function enqueue_scripts() { - wp_enqueue_script( 'featured-content-suggest', get_template_directory_uri() . '/js/featured-content-admin.js', array( 'jquery', 'suggest' ), '20131022', true ); + wp_enqueue_script( 'featured-content-suggest', get_template_directory_uri() . '/js/featured-content-admin.js', array( 'jquery', 'suggest' ), '20131205', true ); } /** diff --git a/src/wp-content/themes/twentynineteen/functions.php b/src/wp-content/themes/twentynineteen/functions.php index 79dfb7ca9a..91fad80756 100644 --- a/src/wp-content/themes/twentynineteen/functions.php +++ b/src/wp-content/themes/twentynineteen/functions.php @@ -222,8 +222,8 @@ function twentynineteen_scripts() { wp_style_add_data( 'twentynineteen-style', 'rtl', 'replace' ); if ( has_nav_menu( 'menu-1' ) ) { - wp_enqueue_script( 'twentynineteen-priority-menu', get_theme_file_uri( '/js/priority-menu.js' ), array(), '1.1', true ); - wp_enqueue_script( 'twentynineteen-touch-navigation', get_theme_file_uri( '/js/touch-keyboard-navigation.js' ), array(), '1.1', true ); + wp_enqueue_script( 'twentynineteen-priority-menu', get_theme_file_uri( '/js/priority-menu.js' ), array(), '20181214', true ); + wp_enqueue_script( 'twentynineteen-touch-navigation', get_theme_file_uri( '/js/touch-keyboard-navigation.js' ), array(), '20181231', true ); } wp_enqueue_style( 'twentynineteen-print-style', get_template_directory_uri() . '/print.css', array(), wp_get_theme()->get( 'Version' ), 'print' ); diff --git a/src/wp-content/themes/twentynineteen/inc/customizer.php b/src/wp-content/themes/twentynineteen/inc/customizer.php index 3d23893740..b0a784e930 100644 --- a/src/wp-content/themes/twentynineteen/inc/customizer.php +++ b/src/wp-content/themes/twentynineteen/inc/customizer.php @@ -125,7 +125,7 @@ function twentynineteen_customize_partial_blogdescription() { * Bind JS handlers to instantly live-preview changes. */ function twentynineteen_customize_preview_js() { - wp_enqueue_script( 'twentynineteen-customize-preview', get_theme_file_uri( '/js/customize-preview.js' ), array( 'customize-preview' ), '20181231', true ); + wp_enqueue_script( 'twentynineteen-customize-preview', get_theme_file_uri( '/js/customize-preview.js' ), array( 'customize-preview' ), '20181214', true ); } add_action( 'customize_preview_init', 'twentynineteen_customize_preview_js' ); @@ -133,7 +133,7 @@ add_action( 'customize_preview_init', 'twentynineteen_customize_preview_js' ); * Load dynamic logic for the customizer controls area. */ function twentynineteen_panels_js() { - wp_enqueue_script( 'twentynineteen-customize-controls', get_theme_file_uri( '/js/customize-controls.js' ), array(), '20181231', true ); + wp_enqueue_script( 'twentynineteen-customize-controls', get_theme_file_uri( '/js/customize-controls.js' ), array(), '20181214', true ); } add_action( 'customize_controls_enqueue_scripts', 'twentynineteen_panels_js' ); diff --git a/src/wp-content/themes/twentyseventeen/functions.php b/src/wp-content/themes/twentyseventeen/functions.php index d1077ebd43..8df2c157b9 100644 --- a/src/wp-content/themes/twentyseventeen/functions.php +++ b/src/wp-content/themes/twentyseventeen/functions.php @@ -468,17 +468,17 @@ function twentyseventeen_scripts() { wp_style_add_data( 'twentyseventeen-ie8', 'conditional', 'lt IE 9' ); // Load the html5 shiv. - wp_enqueue_script( 'html5', get_theme_file_uri( '/assets/js/html5.js' ), array(), '3.7.3' ); + wp_enqueue_script( 'html5', get_theme_file_uri( '/assets/js/html5.js' ), array(), '20161020' ); wp_script_add_data( 'html5', 'conditional', 'lt IE 9' ); - wp_enqueue_script( 'twentyseventeen-skip-link-focus-fix', get_theme_file_uri( '/assets/js/skip-link-focus-fix.js' ), array(), '1.0', true ); + wp_enqueue_script( 'twentyseventeen-skip-link-focus-fix', get_theme_file_uri( '/assets/js/skip-link-focus-fix.js' ), array(), '20161114', true ); $twentyseventeen_l10n = array( 'quote' => twentyseventeen_get_svg( array( 'icon' => 'quote-right' ) ), ); if ( has_nav_menu( 'top' ) ) { - wp_enqueue_script( 'twentyseventeen-navigation', get_theme_file_uri( '/assets/js/navigation.js' ), array( 'jquery' ), '1.0', true ); + wp_enqueue_script( 'twentyseventeen-navigation', get_theme_file_uri( '/assets/js/navigation.js' ), array( 'jquery' ), '20161203', true ); $twentyseventeen_l10n['expand'] = __( 'Expand child menu', 'twentyseventeen' ); $twentyseventeen_l10n['collapse'] = __( 'Collapse child menu', 'twentyseventeen' ); $twentyseventeen_l10n['icon'] = twentyseventeen_get_svg( @@ -489,7 +489,7 @@ function twentyseventeen_scripts() { ); } - wp_enqueue_script( 'twentyseventeen-global', get_theme_file_uri( '/assets/js/global.js' ), array( 'jquery' ), '1.0', true ); + wp_enqueue_script( 'twentyseventeen-global', get_theme_file_uri( '/assets/js/global.js' ), array( 'jquery' ), '20190121', true ); wp_enqueue_script( 'jquery-scrollto', get_theme_file_uri( '/assets/js/jquery.scrollTo.js' ), array( 'jquery' ), '2.1.2', true ); diff --git a/src/wp-content/themes/twentyseventeen/inc/customizer.php b/src/wp-content/themes/twentyseventeen/inc/customizer.php index 1dbfb95b79..32d1c2d8a3 100644 --- a/src/wp-content/themes/twentyseventeen/inc/customizer.php +++ b/src/wp-content/themes/twentyseventeen/inc/customizer.php @@ -236,7 +236,7 @@ function twentyseventeen_is_view_with_layout_option() { * Bind JS handlers to instantly live-preview changes. */ function twentyseventeen_customize_preview_js() { - wp_enqueue_script( 'twentyseventeen-customize-preview', get_theme_file_uri( '/assets/js/customize-preview.js' ), array( 'customize-preview' ), '1.0', true ); + wp_enqueue_script( 'twentyseventeen-customize-preview', get_theme_file_uri( '/assets/js/customize-preview.js' ), array( 'customize-preview' ), '20161002', true ); } add_action( 'customize_preview_init', 'twentyseventeen_customize_preview_js' ); @@ -244,6 +244,6 @@ add_action( 'customize_preview_init', 'twentyseventeen_customize_preview_js' ); * Load dynamic logic for the customizer controls area. */ function twentyseventeen_panels_js() { - wp_enqueue_script( 'twentyseventeen-customize-controls', get_theme_file_uri( '/assets/js/customize-controls.js' ), array(), '1.0', true ); + wp_enqueue_script( 'twentyseventeen-customize-controls', get_theme_file_uri( '/assets/js/customize-controls.js' ), array(), '20161020', true ); } add_action( 'customize_controls_enqueue_scripts', 'twentyseventeen_panels_js' ); diff --git a/src/wp-content/themes/twentysixteen/functions.php b/src/wp-content/themes/twentysixteen/functions.php index f4d42926ac..deef793eee 100644 --- a/src/wp-content/themes/twentysixteen/functions.php +++ b/src/wp-content/themes/twentysixteen/functions.php @@ -389,17 +389,17 @@ function twentysixteen_scripts() { wp_enqueue_script( 'twentysixteen-html5', get_template_directory_uri() . '/js/html5.js', array(), '3.7.3' ); wp_script_add_data( 'twentysixteen-html5', 'conditional', 'lt IE 9' ); - wp_enqueue_script( 'twentysixteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20160816', true ); + wp_enqueue_script( 'twentysixteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20170530', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } if ( is_singular() && wp_attachment_is_image() ) { - wp_enqueue_script( 'twentysixteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20160816' ); + wp_enqueue_script( 'twentysixteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20170530' ); } - wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20181230', true ); + wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20181217', true ); wp_localize_script( 'twentysixteen-script', diff --git a/src/wp-content/themes/twentysixteen/inc/customizer.php b/src/wp-content/themes/twentysixteen/inc/customizer.php index 9867d3d99e..370935802f 100644 --- a/src/wp-content/themes/twentysixteen/inc/customizer.php +++ b/src/wp-content/themes/twentysixteen/inc/customizer.php @@ -484,7 +484,7 @@ add_action( 'wp_enqueue_scripts', 'twentysixteen_color_scheme_css' ); * @since Twenty Sixteen 1.0 */ function twentysixteen_customize_control_js() { - wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls', 'iris', 'underscore', 'wp-util' ), '20160816', true ); + wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls', 'iris', 'underscore', 'wp-util' ), '20170530', true ); wp_localize_script( 'color-scheme-control', 'colorScheme', twentysixteen_get_color_schemes() ); } add_action( 'customize_controls_enqueue_scripts', 'twentysixteen_customize_control_js' ); @@ -495,7 +495,7 @@ add_action( 'customize_controls_enqueue_scripts', 'twentysixteen_customize_contr * @since Twenty Sixteen 1.0 */ function twentysixteen_customize_preview_js() { - wp_enqueue_script( 'twentysixteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20160816', true ); + wp_enqueue_script( 'twentysixteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20170530', true ); } add_action( 'customize_preview_init', 'twentysixteen_customize_preview_js' ); diff --git a/src/wp-content/themes/twentythirteen/functions.php b/src/wp-content/themes/twentythirteen/functions.php index 99ff24071d..6415d4ae9b 100644 --- a/src/wp-content/themes/twentythirteen/functions.php +++ b/src/wp-content/themes/twentythirteen/functions.php @@ -273,7 +273,7 @@ function twentythirteen_scripts_styles() { } // Loads JavaScript file with functionality specific to Twenty Thirteen. - wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20160717', true ); + wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20171218', true ); // Add Source Sans Pro and Bitter fonts, used in the main stylesheet. wp_enqueue_style( 'twentythirteen-fonts', twentythirteen_fonts_url(), array(), null ); diff --git a/src/wp-content/themes/twentythirteen/header.php b/src/wp-content/themes/twentythirteen/header.php index dee665689b..92c54e94ad 100644 --- a/src/wp-content/themes/twentythirteen/header.php +++ b/src/wp-content/themes/twentythirteen/header.php @@ -25,7 +25,7 @@ diff --git a/src/wp-content/themes/twentytwelve/functions.php b/src/wp-content/themes/twentytwelve/functions.php index 18efd16d70..814c75f719 100644 --- a/src/wp-content/themes/twentytwelve/functions.php +++ b/src/wp-content/themes/twentytwelve/functions.php @@ -192,7 +192,7 @@ function twentytwelve_scripts_styles() { } // Adds JavaScript for handling the navigation menu hide-and-show behavior. - wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), '20140711', true ); + wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), '20141205', true ); $font_url = twentytwelve_get_font_url(); if ( ! empty( $font_url ) ) { diff --git a/src/wp-content/themes/twentytwelve/header.php b/src/wp-content/themes/twentytwelve/header.php index f8ff59907b..2888cd8ee3 100644 --- a/src/wp-content/themes/twentytwelve/header.php +++ b/src/wp-content/themes/twentytwelve/header.php @@ -26,7 +26,7 @@