Feat: add option to remove custom- prefix from color slugs#822
Open
Verma-Punit wants to merge 3 commits intoWordPress:trunkfrom
Open
Feat: add option to remove custom- prefix from color slugs#822Verma-Punit wants to merge 3 commits intoWordPress:trunkfrom
Verma-Punit wants to merge 3 commits intoWordPress:trunkfrom
Conversation
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.
Summary
Adds an opt-in save option to remove the
custom-prefix from editor-created color slugs when saving Global Styles totheme.json.This helps new blank themes save cleaner palette slugs such as
base,contrast, andaccentinstead ofcustom-base,custom-contrast, andcustom-accent.The option is disabled by default so existing content that already usescustom-*color slugs remains unchanged unless the user explicitly enables it.The normalization also updates saved style references and avoids renaming when the unprefixed slug would conflict with an existing theme color slug.
Resolved Issue
Fixes #821
Checklist
npm run lint:phpScreen Recording
Screen.Recording.2026-04-20.at.3.41.24.PM.mov