Repository navigation
Make the core color palette opt-in for themes with not theme.json - #36496
Conversation
|
Closes #36489 |
theme.jsontheme.json
| // The "default" theme doesn't have theme.json support. | ||
| switch_theme( 'default' ); |
There was a problem hiding this comment.
It might not be accurate in the future, but it works for now.
b4c25a0 to
d3906db
Compare
|
This is not ready to land. We need to also cover the case in which the theme does not provide any theme palette: in that case, we still need to show the core one. Updated PR description with instructions for testing. |
|
@oandregal, I'm going to add the "In Progress", so we don't merge it by accident 😄 |
|
@fabiankaegy @Mamaduka This is now ready to test. I've run this by some folks (Matías and others) and they think it's best to add new theme supports that classic themes can use to opt-in into this, so I've done that as well. Another point of feedback was that we should rename |
|
I'm going to go ahead and merge this one to unblock #36622 Please, feel free to do post-merge reviews and I'll address any issue left. |
theme.jsontheme.json
|
I did another test run and works as expected 👍 |
…json` (#36496) Co-authored-by: George Mamadashvili <georgemamadashvili@gmail.com>
|
This is not fixed in Gutenberg 12.0.1 . Still broken there. I have a wall of ugly "core". I assume that's intentional? Is there a timeline for this patch to make it into the released plugin? |
|
Hey Steve, this is going to be part of the 12.1 release, which should be a few days away. |


Follow-up to #36492 #35970
In #35970 we introduced the ability to show three different palettes (default, theme, user) in the color UI component. We also have a couple of flags for themes to disable this should they want (
corePalette,coreGradients). However, by introducing this change, themes that don't usetheme.jsonwill now see the default colors as well.This PR introduces the following changes:
theme.jsonthat declare its own palette.theme.jsonto opt-in into the default solid and gradient palettes, so they can show both the default and the theme one:default-color-palettewhich mimic the existingeditor-color-palettetheme supportsdefault-gradient-presetswhich mimics the existingeditor-gradient-presetstheme supportHow to test
Test a theme that does not provide a palette:
Test a theme that provides a palette:
Test a theme that provides a palette and opts-in into the core palette:
add_theme_support( 'default-color-palette' )andadd_theme_support( 'default-gradient-presets' )in itsfunctions.php.