Skip to content

Fix mutation of $obj->src with style_loader_src filter#95

Draft
mreishus wants to merge 5 commits into
mainfrom
reish20260130/fix-src-mutation
Draft

Fix mutation of $obj->src with style_loader_src filter#95
mreishus wants to merge 5 commits into
mainfrom
reish20260130/fix-src-mutation

Conversation

@mreishus
Copy link
Copy Markdown
Contributor

No description provided.

dsas and others added 5 commits January 30, 2026 14:47
The previous implementation grouped all concatenatable CSS files into a
single bundle that was always output first, before non-concatenatable
items. This broke the relative order between concatenated stylesheets
and non-concatenated items (such as files with inline styles).

This caused issues where theme stylesheets that should appear after
Gutenberg's global styles were instead output before them, allowing
Gutenberg's `a:where(:not(.wp-element-button))` rule to override theme
link styling due to CSS cascade order.

The fix adopts the same approach used in concat-js.php: use a level
counter where non-concatenatable items break the current concat group
(double-increment pattern), preserving the original WordPress enqueue
order.

Fixes DOTTHEM-159
Base automatically changed from reish20260130/fix-ordering-errors to main February 2, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants