WordPress: Configure the color picker of a custom field type
To set up the default colors for the color picker of custom type fields, simply add a JavaScript snippet to override the default configuration.In your functions.php file, add the following code, and configure the palette as you wish: add_action( 'admin_footer', 'backgroundColor_hook' ); function backgroundColor_hook( $hook_suffix ) { ?> <script type="text/javascript"> jQuery( document ).ready(function() { jQuery('.js-types-colorpicker').each(function(){ jQuery(this).wpC...