Skip to content

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

Merged
iamprazol merged 4 commits into
developfrom
fix/html5shiv-deprecation
Oct 5, 2026
Merged

iamprazol merged 4 commits into
developfrom
fix/html5shiv-deprecation

Conversation

@rajatgautam755421

@rajatgautam755421 rajatgautam755421 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

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 on WP 6.9+ loses only the IE-only html5shiv.js tag; a script depending on html5shiv still prints. The @fresh spec fails on develop (it prints html5shiv.js for every visitor), passes here.

Replaces #57's approach: #57 (merged) kept the enqueue and only skipped the IE condition on WP 6.9+, so html5shiv.js loaded for every visitor. This PR replaces that whole block (the enqueue and the version_compare branch) with the empty handle. Merged develop in to resolve the conflict.

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
Contributor Author

Re the Copilot overview notes:

@rajatgautam755421

Copy link
Copy Markdown
Contributor Author

@claudegrill suite

@deepench

deepench commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

This now conflicts with develop: #57 was merged and edits the same html5shiv lines in inc/functions.php.

Could you rebase on develop and replace that block (the always-loaded html5shiv.js plus the version_compare branch) with the empty wp_register_script( 'html5shiv', false, … ) from this PR? After the rebase this removes the extra script that #57 now loads on every page on WP 6.9+. Please also mention in the description that this replaces #57's approach.

rajatgautam755421 and others added 2 commits October 2, 2026 12:37
…merged

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@subin-shk subin-shk 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.

LGTM 👍

@deepench deepench left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍

@iamprazol
iamprazol merged commit 93dd291 into develop Oct 5, 2026
1 check failed
@iamprazol
iamprazol deleted the fix/html5shiv-deprecation branch October 5, 2026 07:18
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.

5 participants