Skip to content
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

No longer able to disable custom font and color styles #32411

Closed
philbuchanan opened this issue Jun 2, 2021 · 3 comments
Closed

No longer able to disable custom font and color styles #32411

philbuchanan opened this issue Jun 2, 2021 · 3 comments
Assignees
Labels
[Type] Bug An existing feature does not function as intended

Comments

@philbuchanan
Copy link

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_support declarations 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:

Screen Shot 2021-06-02 at 3 13 20 PM

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
@skorasaurus
Copy link
Member

Regarding the color palette, that should be fixed in this PR - #32225

@youknowriad
Copy link
Contributor

cc @nosolosw @jorgefilipecosta

@youknowriad youknowriad added the [Type] Bug An existing feature does not function as intended label Jun 3, 2021
@jorgefilipecosta jorgefilipecosta self-assigned this Jun 3, 2021
@oandregal
Copy link
Member

This has been fixed in 10.8 as per #32200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

5 participants