Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Adds support for editor font sizes for sites using the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Adds support for editor font sizes.
add_theme_support( 'editor-font-sizes', array(
array(
'name' => __( 'small', 'genesis-sample' ),
'shortName' => __( 'S', 'genesis-sample' ),
'size' => 12,
'slug' => 'small'
),
array(
'name' => __( 'regular', 'genesis-sample' ),
'shortName' => __( 'M', 'genesis-sample' ),
'size' => 16,
'slug' => 'regular'
),
array(
'name' => __( 'large', 'genesis-sample' ),
'shortName' => __( 'L', 'genesis-sample' ),
'size' => 20,
'slug' => 'large'
),
array(
'name' => __( 'larger', 'genesis-sample' ),
'shortName' => __( 'XL', 'genesis-sample' ),
'size' => 24,
'slug' => 'larger'
)
) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.