-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core palette can no longer be overridden from PHP #36489
Comments
The issue is not present in Version 11.8.3 Rolling back to Version 11.8.3 on problem websites temporarily masks the issue and hides "core" palettes until a more acceptable resolution is found. |
@steveangstrom the fix hat was done in #36492 only applies to I suppose you could probably filter the editor settings like so: add_filter(
'block_editor_settings_all',
'remove_core_color_palette_support_from_editor_settings'
);
/**
* This function removes the Core Palette and Gradients fron the Color Pickers
*
* @param array $settings block editor settings
*/
function remove_core_color_palette_support_from_editor_settings( $settings ) {
$settings['color']['corePalette'] = false;
$settings['color']['coreGradients'] = false;
return $settings;
} I haven't tested it though. |
No, that does not work WP 5.8.2 The very major problem I have with Gutenberg and all recent WP development is this casual attitude to real world commercial sites. many commercial site creators like me follow those docs, we've delivering sites in the last 18 months trying to keep up with this shifting unstable pile of features. Please stop treating PHP as some kind of niche afterthought PHP is not legacy, it is the basis of 99% of sites running WP. This feverish JS fetish Gutenberg community is an ivory tower academic bubble and it makes me furious as everyone pats themselves on the back for theoretical successes - as I'm constantly trying to deliver real world sites and the foundations are shifting every week. please. Gutenberg Devs. Look at the CMS corporate site community and consider us just a little bit, I am absolutely begging you, for gods sake. |
This is NOT FIXED in Gutenberg 12.0.1 Current status. No theme.json. Colours defined in functions.php. Palette is a still mess on all sites using Gutenberg. Sites on 12.0.1 are broken as shown below. I assume the only "fix" is to roll back to Gutenberg 11.8.3 |
Hey Steve, the patch that hides the core palette for themes with no theme.json by default is going to be part of Gutenberg 12.1 which is a few days away. |
Description
Setting brand colours no longer works in gutenberg it's working fine in WP 5.8.2 it is not working in Gutenberg Version 11.9.0
Core colours can no longer be removed.
Removing "core" colours is VITAL for branded corporate sites.
PHP support is VITAL for established sites and those being developed away from your bleeding edge
Step-by-step reproduction instructions
METHOD
in PHP enter this in a theme functions.php
function sc_custom_gutenberg_custom_color_palette() { add_theme_support( 'editor-color-palette', array( array( 'name' => __( 'Light Text', 'sc' ), 'slug' => 'light-text', 'color' => '#FFFFFF', ), array( 'name' => __( 'Darker Text', 'sc' ), 'slug' => 'darker-text', 'color' => '#535353', ), array( 'name' => __( 'Amaranth', 'sc' ), 'slug' => 'main-amaranth', 'color' => '#E23448', ), ) ); } add_action( 'after_setup_theme', 'sc_custom_gutenberg_custom_color_palette', 20 );
the editor will continue to show the awful "core" colours + the new array
Screenshots, screen recording, code snippet
WP 5.8.2 core - colours can be set correctly
Gutenberg Version 11.9.0 - awful colours persist
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: