Gutenberg: Disabling custom font size not working

Created on 23 Oct 2018  路  7Comments  路  Source: WordPress/gutenberg

Describe the bug
I added add_theme_support( 'disable-custom-font-sizes' ); to my theme , but the custom font sizes field still appears in my theme.

Screenshots
screenshot 2018-10-23 at 12 14 50

Desktop (please complete the following information):

  • Browser Chrome
  • Version 69

Additional context

  • 4.0
[Status] Not Applicable

Most helpful comment

As of wordpress 5.0, disabling colors works but there is still a list of colors : we need to add_theme_support( 'editor-color-palette' ); before disabling it. Weird ?

The disabling of custom font-sizes works too but there is no way to hide the entire "text settings" block" :'(

All this functions are fired in the "after_theme_setup" action.

All 7 comments

Hey @salamalala,
this is a feature of Gutenberg 4.1. see #10620, which is not released yet.
You can download the Release Candidate or wait a few days for the release

Ok thanks @Soean. Because it's in the handbook (https://wordpress.org/gutenberg/handbook/extensibility/theme-support/#disabling-custom-font-sizes) I assumed it would be already in the current version.

Im running 4.3.0 and neither add_theme_support( 'disable-custom-font-sizes' ) or add_theme_support( 'disable-custom-colors' ); seem to work for me

@lukehm would you be able to try with 4.4 and, if the problem is still happening for you, create a new issue and include some steps for testing? I can help test but need more explicit testing steps for technical cases where custom code is required. Walk me through it with steps and I'm keen to help test!

@designsimply Steps to reproduce, using a clean WP installation:

  1. Activate Gutenberg.
  2. Add these two lines to functions.php in twentyseventeen:
    add_theme_support( 'disable-custom-font-sizes' ); add_theme_support( 'disable-custom-colors' );
  3. Edit the Gutenberg example post. Click on some text.

Font Size, Background Color, and Text Color are still there.

Ive done that still seeing all items
screen shot 2018-11-29 at 13 50 32

As of wordpress 5.0, disabling colors works but there is still a list of colors : we need to add_theme_support( 'editor-color-palette' ); before disabling it. Weird ?

The disabling of custom font-sizes works too but there is no way to hide the entire "text settings" block" :'(

All this functions are fired in the "after_theme_setup" action.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aaronjorbin picture aaronjorbin  路  3Comments

hedgefield picture hedgefield  路  3Comments

ellatrix picture ellatrix  路  3Comments

cr101 picture cr101  路  3Comments

youknowriad picture youknowriad  路  3Comments