How to override a function in the wp_includes folder(block supports/colors.php)

Question

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.

0
BlackBeard 1 month 2021-10-21T06:13:00-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse