Skip to content

Fix - Stop registering the IE-conditional html5shiv script that fires a deprecation notice - #86

Open
rajatgautam755421 wants to merge 2 commits into
developfrom
fix/html5shiv-deprecation
Open

rajatgautam755421 wants to merge 2 commits into
developfrom
fix/html5shiv-deprecation

Conversation

@rajatgautam755421

Copy link
Copy Markdown

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 empty html5shiv handle, so scripts that list it as a dependency still load. js/html5shiv.js stays, so direct URLs don't 404.

Before (notice shown with debug display on) After
before after

Regression: page HTML unchanged on WP 6.9+; a script depending on html5shiv still prints. New @fresh spec fails on develop, passes here.

Note: #57 changes the same lines but would load html5shiv.js for 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

… 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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 html5shiv dependency 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>
@rajatgautam755421

Copy link
Copy Markdown
Author

Re the Copilot overview notes:

@rajatgautam755421

Copy link
Copy Markdown
Author

@claudegrill suite

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants