Last active
June 16, 2019 08:24
-
-
Save wplit/250b5387464f5dd29000a9c1d8c6f9b5 to your computer and use it in GitHub Desktop.
Add Global Colours to WP Editor
This file contains hidden or 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
| // Adds brand colours to editor palette for content editors | |
| add_theme_support( 'editor-color-palette', array( | |
| array( | |
| 'name' => 'Primary', | |
| 'slug' => 'primary', | |
| 'color' => '#db164d', // Replace with your colour | |
| ), | |
| array( | |
| 'name' => 'Secondary', | |
| 'slug' => 'secondary', | |
| 'color' => '#111', // Replace with your colour | |
| ), | |
| array( | |
| 'name' => 'Link Hover', | |
| 'slug' => 'link-hover', | |
| 'color' => '#c20034', // Replace with your colour | |
| ), | |
| ) ); | |
| // Disables access to all other colors | |
| add_theme_support( 'disable-custom-colors' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment