tomusborne / generatepress

453 stars 89 forks source link

Fix: Allow rgb() color values #506

Closed tomusborne closed 1 year ago

tomusborne commented 1 year ago

close #456

This allows us to save rgb() values in the Customizer.

While testing I noticed that all of our color fields accept transparency now (body, text etc...) when they didn't use to. This isn't a bad thing, but rgba() values currently don't save in those fields as they're set to use generate_sanitize_hex_color. Instead of changing all of the sanitize fields to generate_sanitize_rgba_color, I just added in rgba() sanitizing into the hex function.