Changeset 49868
- Timestamp:
- 12/22/2020 04:17:27 PM (4 years ago)
- Location:
- branches/5.6
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.6
-
branches/5.6/src/wp-content/themes/twentytwentyone/functions.php
r49829 r49868 397 397 // Note, the is_IE global variable is defined by WordPress and is used 398 398 // to detect if the current browser is internet explorer. 399 global $is_IE ;399 global $is_IE, $wp_scripts; 400 400 if ( $is_IE ) { 401 401 // If IE 11 or below, use a flattened stylesheet with static values replacing CSS Variables. … … 417 417 } 418 418 419 // Register the IE11 polyfill file. 419 420 wp_register_script( 420 'twenty-twenty-one-ie11-polyfills ',421 'twenty-twenty-one-ie11-polyfills-asset', 421 422 get_template_directory_uri() . '/assets/js/polyfills.js', 422 423 array(), 423 424 wp_get_theme()->get( 'Version' ), 424 425 true 426 ); 427 428 // Register the IE11 polyfill loader. 429 wp_register_script( 430 'twenty-twenty-one-ie11-polyfills', 431 null, 432 array(), 433 wp_get_theme()->get( 'Version' ), 434 true 435 ); 436 wp_add_inline_script( 437 'twenty-twenty-one-ie11-polyfills', 438 wp_get_script_polyfill( 439 $wp_scripts, 440 array( 441 'Element.prototype.matches && Element.prototype.closest && window.NodeList && NodeList.prototype.forEach' => 'twenty-twenty-one-ie11-polyfills-asset', 442 ) 443 ) 425 444 ); 426 445
Note: See TracChangeset
for help on using the changeset viewer.