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:

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.

BlackBeard 12 months 2021-10-21T06:13:00-05:00 0 Answers 0 views 0

Leave an answer