Fix two 1.3.0 regressions reported on the support forum - #356
Merged
Conversation
Link colour taking the button colour
------------------------------------
The theme-mod -> theme.json bridge mapped link_color and button_color both onto
the 'primary' preset slug, so on a site that set the two to different colours the
second write silently overwrote the first and links rendered in the button's
colour. Reported by chrisesch: customizer set to #006699, links displaying as
#5D47D7. Reproduced exactly -- with both mods set the page emitted
:root{--wp--preset--color--primary:#5d47d7;}
Buttons now have their own 'button' / 'button-hover' palette slots.
Worth recording why this matters beyond the obvious. theme.json's link rule and
the theme's own customizer CSS have equal specificity, so which one wins depends
on emission order, and a caching or optimisation plugin that reorders CSS can
flip it -- which is why this hit some sites and not a stock install. With the
slugs separated both rules resolve to the same colour, so the result no longer
depends on winning that tie.
Child themes replacing Bootstrap / FlexSlider / Owl Carousel
------------------------------------------------------------
1.3.0 renamed four generic asset handles so a plugin claiming 'bootstrap' could
not suppress the theme's stylesheet. That fixed a real fault but silently broke
the most common child-theme pattern there is:
wp_dequeue_style( 'bootstrap' ); // swap in my own build
After the rename that names a handle nobody registers, so it does nothing, the
parent's Bootstrap loads again, and it lands on top of whatever the child had
replaced it with. Nothing errors; the layout just changes under them on update.
Reproduced with a two-line child theme: bootstrap stylesheets on the page went
0 (1.2.21) -> 1 (1.3.0).
Each old handle is registered as an empty placeholder and enqueued; a late hook
mirrors any dequeue of it onto the real stylesheet. The placeholder is only
registered when nothing else has claimed the handle, so the theme is not back to
squatting on generic names.
Verified all three cases that have to hold at once:
child theme dequeues 'bootstrap' 0 stylesheets (was 1 in 1.3.0)
default site, nothing dequeued 1 stylesheet, shapely-bootstrap
plugin claims 'bootstrap' first both load; theme's is not suppressed
13 pages crawled, 0 failures, 0 fatals, 0 theme lines in WP_DEBUG_LOG.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two users reported problems after the 1.3.0 update. Both are mine.
1. Links taking the button colour
unwanted link color — customizer set to
#006699, links rendering#5D47D7.The theme-mod →
theme.jsonbridge mappedlink_colorandbutton_coloronto the sameprimaryslug, so the second write silently overwrote the first. Reproduced exactly — with both mods set, the page emitted:Buttons now get their own
button/button-hoverpalette slots.There's a subtler reason this matters.
theme.json's link rule and the theme's own customizer CSS have equal specificity, so which wins depends on emission order — and a caching or optimisation plugin that reorders CSS can flip it. That's likely why it hit some sites and not a stock install. With the slugs separated, both rules resolve to the same colour, so the outcome no longer depends on winning that tie.2. Child themes replacing Bootstrap / FlexSlider / Owl Carousel
Update breaks navigation.
1.3.0 renamed four generic handles so a plugin claiming
bootstrapcouldn't suppress the theme's stylesheet. That fixed a real fault — but silently broke the most common child-theme pattern there is:After the rename that names a handle nobody registers. It does nothing, the parent's Bootstrap comes back, and it lands on top of whatever the child replaced it with. Nothing errors — the layout just changes under them on update.
Reproduced with a two-line child theme: bootstrap stylesheets on the page went 0 (1.2.21) → 1 (1.3.0).
Each old handle is now registered as an empty placeholder and enqueued; a late hook mirrors any dequeue of it onto the real stylesheet. The placeholder is only registered when nothing else has claimed the handle, so the theme isn't back to squatting on generic names.
Verified — all three cases that must hold at once
bootstrapshapely-bootstrapbootstrapfirst13 pages crawled, 0 failures, 0 fatals, 0 theme lines in
WP_DEBUG_LOG.🤖 Generated with Claude Code