How to load wp-polyfill in WP 5.8 admin?
-
It seems that wp-polyfill was removed from being loaded in WordPress 5.8. What’s the best way to add back wp-polyfill being loaded in wp-admin? It would be great if it’s in functions.php. I need polyfill in wp-admin and currently running in 5.7.2 due to this issue. I’m running custom programs that interact with the dashboard that use IE 11 and I’m unable to switch browsers.
IE 11 support was removed from WordPress 5.8 according to this post: https://make.www.ads-software.com/core/2021/06/28/miscellaneous-developer-focused-changes-in-wordpress-5-8/
The following code was removed from WP 5.8 in the file wp-includes/script-loader.php:
$scripts->add( 'wp-polyfill', null, array( 'wp-polyfill' ) ); did_action( 'init' ) && $scripts->add_inline_script( 'wp-polyfill', wp_get_script_polyfill( $scripts, array( '\'fetch\' in window' => 'wp-polyfill-fetch', 'document.contains' => 'wp-polyfill-node-contains', 'window.DOMRect' => 'wp-polyfill-dom-rect', 'window.URL && window.URL.prototype && window.URLSearchParams' => 'wp-polyfill-url', 'window.FormData && window.FormData.prototype.keys' => 'wp-polyfill-formdata', 'Element.prototype.matches && Element.prototype.closest' => 'wp-polyfill-element-closest', '\'objectFit\' in document.documentElement.style' => 'wp-polyfill-object-fit', ) ) );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to load wp-polyfill in WP 5.8 admin?’ is closed to new replies.