Simplify the Editor's Typography Controls
Hides letter spacing, text transform, text decoration, font style, font weight, line height and writing mode controls, leaving a calmer sidebar for content editors.
Opens WPIDE on
Code
add_filter( 'wp_theme_json_data_theme', function ( $theme_json ) {
return $theme_json->update_with( array(
'version' => 3,
'settings' => array(
'typography' => array(
'letterSpacing' => false,
'textTransform' => false,
'textDecoration' => false,
'fontStyle' => false,
'fontWeight' => false,
'lineHeight' => false,
'writingMode' => false,
),
),
) );
} );
Notes
Remove lines from the list to keep a control.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.