- Timestamp:
- 02/13/2026 04:13:53 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwentyone/functions.php
r61628 r61635 458 458 459 459 /** 460 * Fixes skip link focus in IE11. 461 * 462 * This does not enqueue the script because it is tiny and because it is only for IE11, 463 * thus it does not warrant having an entire dedicated blocking script being loaded. 460 * Adds an HTML comment about the lack of Internet Explorer support. 461 * 462 * This originally printed a script to fix the skip link focus behavior in IE11. 464 463 * 465 464 * @since Twenty Twenty-One 1.0 466 465 * @deprecated Twenty Twenty-One 1.9 Removed from wp_print_footer_scripts action. 466 * @deprecated Twenty Twenty-One 2.8 Removed Internet Explorer support. 467 467 * 468 468 * @link https://git.io/vWdr2 469 469 */ 470 470 function twenty_twenty_one_skip_link_focus_fix() { 471 472 // If SCRIPT_DEBUG is defined and true, print the unminified file. 473 if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) { 474 echo '<script>'; 475 include get_template_directory() . '/assets/js/skip-link-focus-fix.js'; 476 echo '</script>'; 477 } else { 478 // The following is minified via `npx terser --compress --mangle -- assets/js/skip-link-focus-fix.js`. 479 ?> 480 <script> 481 /(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",(function(){var t,e=location.hash.substring(1);/^[A-z0-9_-]+$/.test(e)&&(t=document.getElementById(e))&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())}),!1); 482 </script> 483 <?php 484 } 471 ?> 472 <!-- <?php echo __FUNCTION__; ?>(): Internet Explorer support was removed. --> 473 <?php 485 474 } 486 475
Note: See TracChangeset
for help on using the changeset viewer.