Last active
October 1, 2019 16:47
-
-
Save mahdiyazdani/125c1778c2f70062e41e3c23d8a456be to your computer and use it in GitHub Desktop.
Adding support for editor color palette
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-color-palette', array( | |
array( | |
'name' => __( 'Strong Magenta', 'themeLangDomain' ), | |
'slug' => 'strong-magenta', | |
'color' => '#a156b4', | |
), | |
array( | |
'name' => __( 'Light Grayish Magenta', 'themeLangDomain' ), | |
'slug' => 'light-grayish-magenta', | |
'color' => '#d0a5db', | |
), | |
array( | |
'name' => __( 'Very Light Gray', 'themeLangDomain' ), | |
'slug' => 'very-light-gray', | |
'color' => '#eee', | |
), | |
array( | |
'name' => __( 'Very Dark Gray', 'themeLangDomain' ), | |
'slug' => 'very-dark-gray', | |
'color' => '#444', | |
), | |
) ); | |
} | |
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