How to override a function in the wp_includes folder(block supports/colors.php)
I customized my Gutenberg block color pallete and the WordPress default is that the CSS classes generated has the form has-(slug)-color
.
For example say I added a color called red. The resulting CSS class will be has-red-color
.
I traced the function to a core WordPress file: https://github.com/WordPress/WordPress/blob/master/wp-includes/block-supports/colors.php#L73
How do I override this function from my functions.php in my theme so I can generate different class names.
I've been reading about hooks and filters but I'm not sure how to use that in this case.
Topic block-editor color-picker Wordpress
Category Web