Last active
February 25, 2021 19:11
-
-
Save DarioBF/07e2af9aca497f72e8188d4a6f508180 to your computer and use it in GitHub Desktop.
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
// Add custom editor font sizes. | |
add_theme_support( | |
'editor-font-sizes', | |
array( | |
array( | |
'name' => __( 'Smallest', 'dariobf' ), | |
'shortName' => __( 'XXS', 'dariobf' ), | |
'size' => '.625rem', | |
'slug' => 'smallest', | |
), | |
array( | |
'name' => __( 'Smaller', 'dariobf' ), | |
'shortName' => __( 'XS', 'dariobf' ), | |
'size' => '.75rem', | |
'slug' => 'smaller', | |
), | |
array( | |
'name' => __( 'Small', 'dariobf' ), | |
'shortName' => __( 'S', 'dariobf' ), | |
'size' => '1rem', | |
'slug' => 'small', | |
), | |
array( | |
'name' => __( 'Normal', 'dariobf' ), | |
'shortName' => __( 'M', 'dariobf' ), | |
'size' => '1.125rem', | |
'slug' => 'normal', | |
), | |
array( | |
'name' => __( 'Big', 'dariobf' ), | |
'shortName' => __( 'L', 'dariobf' ), | |
'size' => '1.75rem', | |
'slug' => 'large', | |
), | |
array( | |
'name' => __( 'Bigger', 'dariobf' ), | |
'shortName' => __( 'XL', 'dariobf' ), | |
'size' => '2.375rem', | |
'slug' => 'large', | |
), | |
array( | |
'name' => __( 'Biggest', 'dariobf' ), | |
'shortName' => __( 'XXL', 'dariobf' ), | |
'size' => '2.875rem', | |
'slug' => 'large', | |
), | |
) | |
); | |
// Editor color palette. | |
add_theme_support( | |
'editor-color-palette', | |
array( | |
array( | |
'name' => __( 'Primary', 'dariobf' ), | |
'slug' => 'primary', | |
'color' => '#403996', | |
), | |
array( | |
'name' => __( 'Secondary', 'dariobf' ), | |
'slug' => 'secondary', | |
'color' => '#282963', | |
), | |
array( | |
'name' => __( 'Tertiary', 'dariobf' ), | |
'slug' => 'tertiary', | |
'color' => '#00AEEF', | |
), | |
array( | |
'name' => __( 'Dark Gray', 'dariobf' ), | |
'slug' => 'dark-gray', | |
'color' => '#222', | |
), | |
array( | |
'name' => __( 'Light Gray', 'dariobf' ), | |
'slug' => 'light-gray', | |
'color' => '#767676', | |
), | |
array( | |
'name' => __( 'White', 'dariobf' ), | |
'slug' => 'white', | |
'color' => '#FFF', | |
), | |
) | |
); | |
// Disable custom font sizes. | |
add_theme_support( 'disable-custom-font-sizes' ); | |
// Editor Font Sizes. | |
add_theme_support( | |
'editor-font-sizes', | |
array( | |
array( | |
'name' => __( 'small', 'dariobf' ), | |
'shortName' => __( 'S', 'dariobf' ), | |
'size' => 14, | |
'slug' => 'small', | |
), | |
array( | |
'name' => __( 'normal', 'dariobf' ), | |
'shortName' => __( 'N', 'dariobf' ), | |
'size' => 18, | |
'slug' => 'normal', | |
), | |
array( | |
'name' => __( 'big', 'dariobf' ), | |
'shortName' => __( 'B', 'dariobf' ), | |
'size' => 24, | |
'slug' => 'big', | |
), | |
array( | |
'name' => __( 'bigger', 'dariobf' ), | |
'shortName' => __( 'BB', 'dariobf' ), | |
'size' => 36, | |
'slug' => 'bigger', | |
), | |
array( | |
'name' => __( 'biggest', 'dariobf' ), | |
'shortName' => __( 'BBB', 'dariobf' ), | |
'size' => 48, | |
'slug' => 'biggest', | |
), | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment