Created
January 9, 2020 14:47
-
-
Save vanaf1979/d904d848937778594dafc315d87ea765 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
<?php | |
/** | |
* disable_custom_color_picler. | |
* | |
* Disable the custom color selector of the gutenberg color palette, | |
* | |
* @see https://since1979.dev/wp-snippet-002-changing-the-gutenberg-color-palette/ | |
* | |
* @uses add_theme_support https://developer.wordpress.org/reference/functions/add_theme_support/ | |
*/ | |
function disable_custom_color_picker() | |
{ | |
add_theme_support('disable-custom-colors'); | |
} | |
/** | |
* Hook: after_setup_theme. | |
* | |
* @uses add_action() https://developer.wordpress.org/reference/functions/add_action/ | |
* @uses after_setup_theme https://developer.wordpress.org/reference/hooks/after_setup_theme/ | |
*/ | |
add_action('after_setup_theme', 'disable_custom_color_picker'); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment