WordPress.org

Make WordPress Core

Ticket #46981: 46981.1.diff

File 46981.1.diff, 19.6 KB (added by ianbelanger, 2 months ago)

Updates all theme script enqueues with most recent modified date as version

  • src/wp-content/themes/twentyeleven/header.php

     
    5151<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
    5252<link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
    5353<!--[if lt IE 9]>
    54 <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
     54<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js?ver=3.7.0" type="text/javascript"></script>
    5555<![endif]-->
    5656<?php
    5757        /*
  • src/wp-content/themes/twentyeleven/inc/theme-options.php

     
    1818 */
    1919function twentyeleven_admin_enqueue_scripts( $hook_suffix ) {
    2020        wp_enqueue_style( 'twentyeleven-theme-options', get_template_directory_uri() . '/inc/theme-options.css', false, '2011-04-28' );
    21         wp_enqueue_script( 'twentyeleven-theme-options', get_template_directory_uri() . '/inc/theme-options.js', array( 'farbtastic' ), '2011-06-10' );
     21        wp_enqueue_script( 'twentyeleven-theme-options', get_template_directory_uri() . '/inc/theme-options.js', array( 'farbtastic' ), '20110610' );
    2222        wp_enqueue_style( 'farbtastic' );
    2323}
    2424add_action( 'admin_print_styles-appearance_page_theme_options', 'twentyeleven_admin_enqueue_scripts' );
  • src/wp-content/themes/twentyeleven/showcase.php

     
    1616 */
    1717
    1818// Enqueue showcase script for the slider
    19 wp_enqueue_script( 'twentyeleven-showcase', get_template_directory_uri() . '/js/showcase.js', array( 'jquery' ), '2011-04-28' );
     19wp_enqueue_script( 'twentyeleven-showcase', get_template_directory_uri() . '/js/showcase.js', array( 'jquery' ), '20110429' );
    2020
    2121get_header(); ?>
    2222
  • src/wp-content/themes/twentyfifteen/functions.php

     
    380380        wp_enqueue_style( 'twentyfifteen-ie7', get_template_directory_uri() . '/css/ie7.css', array( 'twentyfifteen-style' ), '20141010' );
    381381        wp_style_add_data( 'twentyfifteen-ie7', 'conditional', 'lt IE 8' );
    382382
    383         wp_enqueue_script( 'twentyfifteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20141010', true );
     383        wp_enqueue_script( 'twentyfifteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20141028', true );
    384384
    385385        if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
    386386                wp_enqueue_script( 'comment-reply' );
    387387        }
    388388
    389389        if ( is_singular() && wp_attachment_is_image() ) {
    390                 wp_enqueue_script( 'twentyfifteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20141010' );
     390                wp_enqueue_script( 'twentyfifteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20141210' );
    391391        }
    392392
    393         wp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150330', true );
     393        wp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20171218', true );
    394394        wp_localize_script(
    395395                'twentyfifteen-script',
    396396                'screenReaderText',
  • src/wp-content/themes/twentyfifteen/header.php

     
    1616        <link rel="profile" href="http://gmpg.org/xfn/11">
    1717        <link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
    1818        <!--[if lt IE 9]>
    19         <script src="<?php echo esc_url( get_template_directory_uri() ); ?>/js/html5.js"></script>
     19        <script src="<?php echo esc_url( get_template_directory_uri() ); ?>/js/html5.js?ver=3.7.0"></script>
    2020        <![endif]-->
    2121        <?php wp_head(); ?>
    2222</head>
  • src/wp-content/themes/twentyfourteen/functions.php

     
    330330        }
    331331
    332332        if ( is_singular() && wp_attachment_is_image() ) {
    333                 wp_enqueue_script( 'twentyfourteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20130402' );
     333                wp_enqueue_script( 'twentyfourteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20150120' );
    334334        }
    335335
    336336        if ( is_active_sidebar( 'sidebar-3' ) ) {
     
    338338        }
    339339
    340340        if ( is_front_page() && 'slider' == get_theme_mod( 'featured_content_layout' ) ) {
    341                 wp_enqueue_script( 'twentyfourteen-slider', get_template_directory_uri() . '/js/slider.js', array( 'jquery' ), '20131205', true );
     341                wp_enqueue_script( 'twentyfourteen-slider', get_template_directory_uri() . '/js/slider.js', array( 'jquery' ), '20150120', true );
    342342                wp_localize_script(
    343343                        'twentyfourteen-slider',
    344344                        'featuredSliderDefaults',
     
    349349                );
    350350        }
    351351
    352         wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150315', true );
     352        wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20171218', true );
    353353}
    354354add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' );
    355355
  • src/wp-content/themes/twentyfourteen/header.php

     
    2525        <link rel="profile" href="http://gmpg.org/xfn/11">
    2626        <link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
    2727        <!--[if lt IE 9]>
    28         <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js"></script>
     28        <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js?ver=3.7.0"></script>
    2929        <![endif]-->
    3030        <?php wp_head(); ?>
    3131</head>
  • src/wp-content/themes/twentyfourteen/inc/customizer.php

     
    139139 * @since Twenty Fourteen 1.0
    140140 */
    141141function twentyfourteen_customize_preview_js() {
    142         wp_enqueue_script( 'twentyfourteen_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20131205', true );
     142        wp_enqueue_script( 'twentyfourteen_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20141015', true );
    143143}
    144144add_action( 'customize_preview_init', 'twentyfourteen_customize_preview_js' );
    145145
  • src/wp-content/themes/twentyfourteen/inc/featured-content.php

     
    433433         * @since Twenty Fourteen 1.0
    434434         */
    435435        public static function enqueue_scripts() {
    436                 wp_enqueue_script( 'featured-content-suggest', get_template_directory_uri() . '/js/featured-content-admin.js', array( 'jquery', 'suggest' ), '20131022', true );
     436                wp_enqueue_script( 'featured-content-suggest', get_template_directory_uri() . '/js/featured-content-admin.js', array( 'jquery', 'suggest' ), '20131205', true );
    437437        }
    438438
    439439        /**
  • src/wp-content/themes/twentynineteen/functions.php

     
    222222        wp_style_add_data( 'twentynineteen-style', 'rtl', 'replace' );
    223223
    224224        if ( has_nav_menu( 'menu-1' ) ) {
    225                 wp_enqueue_script( 'twentynineteen-priority-menu', get_theme_file_uri( '/js/priority-menu.js' ), array(), '1.1', true );
    226                 wp_enqueue_script( 'twentynineteen-touch-navigation', get_theme_file_uri( '/js/touch-keyboard-navigation.js' ), array(), '1.1', true );
     225                wp_enqueue_script( 'twentynineteen-priority-menu', get_theme_file_uri( '/js/priority-menu.js' ), array(), '20181214', true );
     226                wp_enqueue_script( 'twentynineteen-touch-navigation', get_theme_file_uri( '/js/touch-keyboard-navigation.js' ), array(), '20181231', true );
    227227        }
    228228
    229229        wp_enqueue_style( 'twentynineteen-print-style', get_template_directory_uri() . '/print.css', array(), wp_get_theme()->get( 'Version' ), 'print' );
  • src/wp-content/themes/twentynineteen/inc/customizer.php

     
    125125 * Bind JS handlers to instantly live-preview changes.
    126126 */
    127127function twentynineteen_customize_preview_js() {
    128         wp_enqueue_script( 'twentynineteen-customize-preview', get_theme_file_uri( '/js/customize-preview.js' ), array( 'customize-preview' ), '20181231', true );
     128        wp_enqueue_script( 'twentynineteen-customize-preview', get_theme_file_uri( '/js/customize-preview.js' ), array( 'customize-preview' ), '20181214', true );
    129129}
    130130add_action( 'customize_preview_init', 'twentynineteen_customize_preview_js' );
    131131
     
    133133 * Load dynamic logic for the customizer controls area.
    134134 */
    135135function twentynineteen_panels_js() {
    136         wp_enqueue_script( 'twentynineteen-customize-controls', get_theme_file_uri( '/js/customize-controls.js' ), array(), '20181231', true );
     136        wp_enqueue_script( 'twentynineteen-customize-controls', get_theme_file_uri( '/js/customize-controls.js' ), array(), '20181214', true );
    137137}
    138138add_action( 'customize_controls_enqueue_scripts', 'twentynineteen_panels_js' );
    139139
  • src/wp-content/themes/twentyseventeen/functions.php

     
    467467        wp_style_add_data( 'twentyseventeen-ie8', 'conditional', 'lt IE 9' );
    468468
    469469        // Load the html5 shiv.
    470         wp_enqueue_script( 'html5', get_theme_file_uri( '/assets/js/html5.js' ), array(), '3.7.3' );
     470        wp_enqueue_script( 'html5', get_theme_file_uri( '/assets/js/html5.js' ), array(), '20161020' );
    471471        wp_script_add_data( 'html5', 'conditional', 'lt IE 9' );
    472472
    473         wp_enqueue_script( 'twentyseventeen-skip-link-focus-fix', get_theme_file_uri( '/assets/js/skip-link-focus-fix.js' ), array(), '1.0', true );
     473        wp_enqueue_script( 'twentyseventeen-skip-link-focus-fix', get_theme_file_uri( '/assets/js/skip-link-focus-fix.js' ), array(), '20161114', true );
    474474
    475475        $twentyseventeen_l10n = array(
    476476                'quote' => twentyseventeen_get_svg( array( 'icon' => 'quote-right' ) ),
    477477        );
    478478
    479479        if ( has_nav_menu( 'top' ) ) {
    480                 wp_enqueue_script( 'twentyseventeen-navigation', get_theme_file_uri( '/assets/js/navigation.js' ), array( 'jquery' ), '1.0', true );
     480                wp_enqueue_script( 'twentyseventeen-navigation', get_theme_file_uri( '/assets/js/navigation.js' ), array( 'jquery' ), '20161203', true );
    481481                $twentyseventeen_l10n['expand']   = __( 'Expand child menu', 'twentyseventeen' );
    482482                $twentyseventeen_l10n['collapse'] = __( 'Collapse child menu', 'twentyseventeen' );
    483483                $twentyseventeen_l10n['icon']     = twentyseventeen_get_svg(
     
    488488                );
    489489        }
    490490
    491         wp_enqueue_script( 'twentyseventeen-global', get_theme_file_uri( '/assets/js/global.js' ), array( 'jquery' ), '1.0', true );
     491        wp_enqueue_script( 'twentyseventeen-global', get_theme_file_uri( '/assets/js/global.js' ), array( 'jquery' ), '20190121', true );
    492492
    493493        wp_enqueue_script( 'jquery-scrollto', get_theme_file_uri( '/assets/js/jquery.scrollTo.js' ), array( 'jquery' ), '2.1.2', true );
    494494
  • src/wp-content/themes/twentyseventeen/inc/customizer.php

     
    236236 * Bind JS handlers to instantly live-preview changes.
    237237 */
    238238function twentyseventeen_customize_preview_js() {
    239         wp_enqueue_script( 'twentyseventeen-customize-preview', get_theme_file_uri( '/assets/js/customize-preview.js' ), array( 'customize-preview' ), '1.0', true );
     239        wp_enqueue_script( 'twentyseventeen-customize-preview', get_theme_file_uri( '/assets/js/customize-preview.js' ), array( 'customize-preview' ), '20161002', true );
    240240}
    241241add_action( 'customize_preview_init', 'twentyseventeen_customize_preview_js' );
    242242
     
    244244 * Load dynamic logic for the customizer controls area.
    245245 */
    246246function twentyseventeen_panels_js() {
    247         wp_enqueue_script( 'twentyseventeen-customize-controls', get_theme_file_uri( '/assets/js/customize-controls.js' ), array(), '1.0', true );
     247        wp_enqueue_script( 'twentyseventeen-customize-controls', get_theme_file_uri( '/assets/js/customize-controls.js' ), array(), '20161020', true );
    248248}
    249249add_action( 'customize_controls_enqueue_scripts', 'twentyseventeen_panels_js' );
  • src/wp-content/themes/twentysixteen/functions.php

     
    388388        wp_enqueue_script( 'twentysixteen-html5', get_template_directory_uri() . '/js/html5.js', array(), '3.7.3' );
    389389        wp_script_add_data( 'twentysixteen-html5', 'conditional', 'lt IE 9' );
    390390
    391         wp_enqueue_script( 'twentysixteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20160816', true );
     391        wp_enqueue_script( 'twentysixteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20170530', true );
    392392
    393393        if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
    394394                wp_enqueue_script( 'comment-reply' );
    395395        }
    396396
    397397        if ( is_singular() && wp_attachment_is_image() ) {
    398                 wp_enqueue_script( 'twentysixteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20160816' );
     398                wp_enqueue_script( 'twentysixteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20170530' );
    399399        }
    400400
    401         wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20181230', true );
     401        wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20181217', true );
    402402
    403403        wp_localize_script(
    404404                'twentysixteen-script',
  • src/wp-content/themes/twentysixteen/inc/customizer.php

     
    484484 * @since Twenty Sixteen 1.0
    485485 */
    486486function twentysixteen_customize_control_js() {
    487         wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls', 'iris', 'underscore', 'wp-util' ), '20160816', true );
     487        wp_enqueue_script( 'color-scheme-control', get_template_directory_uri() . '/js/color-scheme-control.js', array( 'customize-controls', 'iris', 'underscore', 'wp-util' ), '20170530', true );
    488488        wp_localize_script( 'color-scheme-control', 'colorScheme', twentysixteen_get_color_schemes() );
    489489}
    490490add_action( 'customize_controls_enqueue_scripts', 'twentysixteen_customize_control_js' );
     
    495495 * @since Twenty Sixteen 1.0
    496496 */
    497497function twentysixteen_customize_preview_js() {
    498         wp_enqueue_script( 'twentysixteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20160816', true );
     498        wp_enqueue_script( 'twentysixteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20170530', true );
    499499}
    500500add_action( 'customize_preview_init', 'twentysixteen_customize_preview_js' );
    501501
  • src/wp-content/themes/twentythirteen/functions.php

     
    272272        }
    273273
    274274        // Loads JavaScript file with functionality specific to Twenty Thirteen.
    275         wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20160717', true );
     275        wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20171218', true );
    276276
    277277        // Add Source Sans Pro and Bitter fonts, used in the main stylesheet.
    278278        wp_enqueue_style( 'twentythirteen-fonts', twentythirteen_fonts_url(), array(), null );
  • src/wp-content/themes/twentythirteen/header.php

     
    2525        <link rel="profile" href="http://gmpg.org/xfn/11">
    2626        <link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
    2727        <!--[if lt IE 9]>
    28         <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js"></script>
     28        <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js?ver=3.7.0"></script>
    2929        <![endif]-->
    3030        <?php wp_head(); ?>
    3131</head>
  • src/wp-content/themes/twentytwelve/functions.php

     
    191191        }
    192192
    193193        // Adds JavaScript for handling the navigation menu hide-and-show behavior.
    194         wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), '20140711', true );
     194        wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), '20141205', true );
    195195
    196196        $font_url = twentytwelve_get_font_url();
    197197        if ( ! empty( $font_url ) ) {
  • src/wp-content/themes/twentytwelve/header.php

     
    2626<link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
    2727<?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
    2828<!--[if lt IE 9]>
    29 <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
     29<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js?ver=3.7.0" type="text/javascript"></script>
    3030<![endif]-->
    3131<?php wp_head(); ?>
    3232</head>