Skip to content

ST-958 Fix - Deprecated wp_script_add_data() conditional notice on wp 6.9+ - #57

Merged
deepench merged 1 commit into
masterfrom
ST-958-accelerate-theme-deprecated-warnings-on-php-8-4-and-wordpress-7
Oct 1, 2026
Merged

deepench merged 1 commit into
masterfrom
ST-958-accelerate-theme-deprecated-warnings-on-php-8-4-and-wordpress-7

Conversation

@jenisha00

Copy link
Copy Markdown

No description provided.

Only add the 'conditional' script data for html5shiv on WP < 6.9,
since core dropped IE conditional comment output in 6.9 and the
argument is deprecated there.
@jenisha00 jenisha00 self-assigned this Aug 4, 2026
@jenisha00 jenisha00 added the bug label Aug 4, 2026

@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 👍

@deepench
deepench merged commit 5574d7d into master Oct 1, 2026
@deepench
deepench deleted the ST-958-accelerate-theme-deprecated-warnings-on-php-8-4-and-wordpress-7 branch October 1, 2026 03:26
@rajatgautam755421

Copy link
Copy Markdown
Contributor

@jenisha00 heads-up: with the condition skipped on WP 6.9+, the html5shiv enqueue has no IE gate any more, so html5shiv.js loads in <head> for every visitor on current WordPress — before, it loaded for nobody. Verified on the Pro equivalent (themegrill/accelerate-pro#6) on WP 7.1.2.

#86 fixes this the way Spacious and Radiate did (empty html5shiv handle: no notice, nothing printed, dependents still load). Since that's the only change here, could this one be closed in favour of #86?

rajatgautam755421 added a commit that referenced this pull request Oct 2, 2026
…merged

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
iamprazol pushed a commit that referenced this pull request Oct 5, 2026
… a deprecation notice (#86)

* Fix - Stop registering the IE-conditional html5shiv script that fires 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>

* Test - Tag the PHP-notices spec with the area inc/functions.php maps 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>

* Test - Also assert html5shiv.js is no longer printed now that #57 is merged

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

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

3 participants