Skip to content

Remove obsolete HTML5Shiv conditional script - #504

Open
Kevinlucs wants to merge 1 commit into
wpbrasil:masterfrom
Kevinlucs:fix/remove-obsolete-html5shiv
Open

Remove obsolete HTML5Shiv conditional script#504
Kevinlucs wants to merge 1 commit into
wpbrasil:masterfrom
Kevinlucs:fix/remove-obsolete-html5shiv

Conversation

@Kevinlucs

Copy link
Copy Markdown

Title

Remove obsolete HTML5Shiv conditional script

Description

Description

This pull request removes the HTML5Shiv script and its Internet Explorer conditional loading configuration.

WordPress 6.9 deprecated the use of conditional comments through WP_Dependencies::add_data(), since conditional comments are ignored by all browsers currently supported by WordPress.

The existing implementation generated the following deprecation notice:

WP_Dependencies->add_data() was called with an argument that is deprecated since version 6.9.0.
IE conditional comments are ignored by all supported browsers.

HTML5Shiv was only required for Internet Explorer versions earlier than IE 9, so removing its enqueue configuration does not affect browsers currently supported by WordPress.

Changes

  • Removed the html5shiv script enqueue.
  • Removed the obsolete lt IE 9 conditional script configuration.

Testing

Tested locally with:

  • WordPress 7.0.2
  • PHP 8.2 inside Docker
  • PHP 8.4 syntax validation
  • MariaDB 10.11

Validation performed:

  • Odin theme activated successfully.
  • Front page returned HTTP 200.
  • functions.php passed PHP syntax validation.
  • No HTML5Shiv deprecation notice was registered after clearing and regenerating the WordPress debug log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant