Make WordPress Core


Ignore:
Timestamp:
05/26/2023 05:23:49 PM (2 years ago)
Author:
westonruter
Message:

Bundled Themes: Remove/disable obsolete IE-specific skip-link-focus-fix.

  • Removes script from the wp_print_footer_scripts action in Twenty Nineteen, Twenty Twenty, and Twenty Twenty-One.
  • Switches enqueue functions to just register the scripts in Twenty Fifteen, Twenty Sixteen, and Twenty Seventeen.
  • Rearranges Twenty Seventeen's scripts to connect twentyseventeenScreenReaderText with the global script instead of the unused skip link fix.
  • Updates scripts in Twenty Fifteen and Twenty Sixteen with code from Twenty Seventeen _to run on Internet Explorer only_. Twenty Sixteen needed to keep an adjustment that offsets the toolbar and border.
  • Removes the script from JS files in Twenty Thirteen and Twenty Fourteen and edits their modified dates.

Props sabernhardt, westonruter, joedolson, flixos90, mukesh27.
Fixes #54421.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentysixteen/functions.php

    r55476 r55861  
    406406    wp_script_add_data( 'twentysixteen-html5', 'conditional', 'lt IE 9' );
    407407
    408     wp_enqueue_script( 'twentysixteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20170530', true );
     408    // Skip-link fix is no longer enqueued by default.
     409    wp_register_script( 'twentysixteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20230526', true );
    409410
    410411    if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
Note: See TracChangeset for help on using the changeset viewer.