[wp-trac] [WordPress Trac] #38548: Add new filters on wp_script_is/wp_style_is
WordPress Trac
noreply at wordpress.org
Wed Aug 13 11:54:12 UTC 2025
#38548: Add new filters on wp_script_is/wp_style_is
---------------------------+------------------------------
Reporter: igmoweb | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Script Loader | Version: 4.7
Severity: normal | Resolution:
Keywords: close | Focuses:
---------------------------+------------------------------
Changes (by jonsurrell):
* keywords: => close
Comment:
[https://developer.wordpress.org/reference/functions/wp_style_is/ Linking
wp_style_is() documentation here].
I want to check whether folks are still interested and find this relevant
today. The request seems reasonable, but this ticket is 9 years old and
hasn't had much activity.
-----
> Once grouping is done `wp_style_is('style-1', 'done')` won't work as
style-1 and 2 are now inside `group-1` so `wp_style_is('group-1', 'done')`
would work but this is just known by the plugin that minifies the
styles/scripts. I don't know if the point is clear enough.
I'll clarify what I understand. Imagine plugins ''Style'' and
''Minifier''. The Style plugin produces some styles and needs to query
using `wp_style_is()` for whatever reason. The Minifier plugin has changed
the references that the Style plugin was aware of, causing `wp_style_is()`
to report inaccurate information since the status of `group-1` implies the
status of `style-1`, although `style-1` doesn't exist.
By filtering, the Minifier plugin (which is aware of the link between
`group-1` and `style-1`) can modify the response to report what the Style
plugin really wants to know.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38548#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list