-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
In earlier version of Gutenberg, a developer was able to disable/remove custom font sizes and colors using a few lines of code:
// Disable Gutenberg custom font sizes
add_theme_support('disable-custom-font-sizes');
add_theme_support('editor-font-sizes', array());
// Disable Gutenberg custom colors
add_theme_support('disable-custom-colors');
add_theme_support('editor-color-palette', array());In recent versions (I'm not 100% sure which version) these settings no longer work. #25756 mentioned the same issue but that was closed despite the issue still remaining.
Expected behaviour
I would expect these settings to continue to be honoured. The documentation even states that these settings should still be honoured.
To retain backward compatibility, the existing
add_theme_supportdeclarations that configure the block editor are retrofit in the proper categories for the top-level section. For example, if a theme uses add_theme_support('disable-custom-colors'), it’ll be the same as setting settings.color.custom to false.
Actual behaviour
Even with these settings disabled in functions.php they still show up as:
WordPress information
- WordPress version: 5.7.2
- Gutenberg version: 10.7.1
- Are all plugins except Gutenberg deactivated? Yes
- Are you using a default theme (e.g. Twenty Twenty-One)? No
Device information
- Device: Mac
- Operating system: macOS 11.4
- Browser: Safari 14.1.1
