Problem with editor font sizes in WP 6.1
-
Hi, this is my code, which used to work correctly in WP 6.0.2
add_theme_support( 'editor-font-sizes', array( array( 'name' => esc_html__( 'XS', 'mywebsite' ), 'shortName' => esc_html_x( 'XS', 'Font size', 'mywebsite' ), 'size' => 14, 'slug' => 'extra-small', ), array( 'name' => esc_html__( 'S', 'mywebsite' ), 'shortName' => esc_html_x( 'S', 'Font size', 'mywebsite' ), 'size' => 16, 'slug' => 'small', ), array( 'name' => esc_html__( 'M', 'mywebsite' ), 'shortName' => esc_html_x( 'M', 'Font size', 'mywebsite' ), 'size' => 18, 'slug' => 'normal', ), array( 'name' => esc_html__( 'L', 'mywebsite' ), 'shortName' => esc_html_x( 'L', 'Font size', 'mywebsite' ), 'size' => 30, 'slug' => 'large', ), array( 'name' => esc_html__( 'XL', 'mywebsite' ), 'shortName' => esc_html_x( 'XL', 'Font size', 'mywebsite' ), 'size' => 40, 'slug' => 'extra-large', ), ) );
and here you can see how it looks like now in editor: https://ibb.co/2383bvh
As you can see, there is no px value. Only name of font size, which isn’t the same as on button.
If I choose for example L on button, the has-normal-font-size class is applied. So it works like it used to be, only labels on the buttons are incorrect (and missing px value).
Is it a bug in WP 6.1 or do I have to change something? What exactly? I didn’t find any information about this in field guide.
I don’t have theme.json and don’t want to add it now.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Problem with editor font sizes in WP 6.1’ is closed to new replies.