Fix - Stop registering the IE-conditional html5shiv script that fires a deprecation notice - #86
Open
rajatgautam755421 wants to merge 2 commits into
Open
rajatgautam755421 wants to merge 2 commits into
rajatgautam755421 wants to merge 2 commits into
Conversation
… a deprecation notice wp_script_add_data( 'html5shiv', 'conditional', 'lte IE 8' ) fires a deprecation notice on every page since WordPress 6.9, and the script is no longer printed at all. Replaced with an empty html5shiv handle, as in Spacious and Radiate, so scripts that depend on it still load. js/html5shiv.js stays so direct URLs don't 404. Same fix as themegrill/accelerate-pro#21. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Compatibility and CI coverage issues remain unresolved.
Review effort: Lite
Findings: None
What changed in this PR
This PR removes the deprecated IE-conditional html5shiv registration and adds regression coverage for PHP notices.
Changes:
- Registers an empty
html5shivdependency handle. - Adds a homepage smoke test for PHP notices and deprecations.
| File | Review summary |
|---|---|
inc/functions.php |
Preserve the existing conditional shim for pre-6.9 WordPress; the current change removes IE8 support there. |
tests/e2e/specs/smoke/no-php-notices.spec.ts |
Align the test area with changed-file coverage and assert a successful HTTP response. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…to, and assert a 200 The area decides whether the suite runs this spec for a change to inc/functions.php; it was tagged with an area that file doesn't map to. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Author
|
Re the Copilot overview notes:
|
Author
|
@claudegrill suite |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same fix as themegrill/accelerate-pro#113 (reported by @iamprazol in themegrill/accelerate-pro#21), Spacious (themegrill/spacious#151) and Radiate (themegrill/radiate#73).
Since WordPress 6.9,
wp_script_add_data( 'html5shiv', 'conditional', 'lte IE 8' )fires a deprecation notice on every page, and the script is no longer printed at all. Replaced with an emptyhtml5shivhandle, so scripts that list it as a dependency still load.js/html5shiv.jsstays, so direct URLs don't 404.Regression: page HTML unchanged on WP 6.9+; a script depending on
html5shivstill prints. New@freshspec fails ondevelop, passes here.Note: #57 changes the same lines but would load
html5shiv.jsfor every visitor on WP 6.9+. This PR replaces it.Changelog: Fix - Deprecation notice from the IE-only html5shiv script on WordPress 6.9+.
🤖 Generated with Claude Code