Skip to content

Instantly share code, notes, and snippets.

@jackfearing
Created February 21, 2020 01:26
Show Gist options
  • Save jackfearing/9bcba3443d5f7b753fd085ccdbcb8cdd to your computer and use it in GitHub Desktop.
Save jackfearing/9bcba3443d5f7b753fd085ccdbcb8cdd to your computer and use it in GitHub Desktop.
//********************************************************************************
// Change text size of Gutenberg editor
// https://studiopress.blog/block-font-sizes/
//********************************************************************************
// Adds support for editor font sizes.
// Do NOT include the opening php tag.
add_theme_support( 'editor-font-sizes', array(
array(
'name' => __( 'small', 'vuesource' ),
'shortName' => __( 'S', 'vuesource' ),
'size' => 12,
'slug' => 'small'
),
array(
'name' => __( 'regular', 'vuesource' ),
'shortName' => __( 'M', 'vuesource' ),
'size' => 16,
'slug' => 'regular'
),
array(
'name' => __( 'large', 'vuesource' ),
'shortName' => __( 'L', 'vuesource' ),
'size' => 20,
'slug' => 'large'
),
array(
'name' => __( 'larger', 'vuesource' ),
'shortName' => __( 'XL', 'vuesource' ),
'size' => 24,
'slug' => 'larger'
)
) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment