Last active
October 1, 2019 16:47
-
-
Save mahdiyazdani/6d2fc78c6b874ccbf6225c358a3e56d1 to your computer and use it in GitHub Desktop.
Adding support for editor font sizes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function prefix_setup_theme() { | |
add_theme_support( 'editor-font-sizes', array( | |
array( | |
'name' => __( 'Small', 'themeLangDomain' ), | |
'size' => 12, | |
'slug' => 'small' | |
), | |
array( | |
'name' => __( 'Normal', 'themeLangDomain' ), | |
'size' => 16, | |
'slug' => 'normal' | |
), | |
array( | |
'name' => __( 'Large', 'themeLangDomain' ), | |
'size' => 36, | |
'slug' => 'large' | |
), | |
array( | |
'name' => __( 'Huge', 'themeLangDomain' ), | |
'size' => 50, | |
'slug' => 'huge' | |
) | |
) ); | |
} | |
add_action( 'after_setup_theme', 'prefix_setup_theme', 10 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment