Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #55962, comment 4


Ignore:
Timestamp:
06/12/2022 04:32:46 AM (3 years ago)
Author:
costdev
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #55962, comment 4

    v2 v3  
    2525
    2626This would also mean that we don't have to struggle against "naming is hard", because `sanitize_hex_with_alpha_color()` suggests it must have alpha, which means checking a valid hex colour code would require a call to both functions instead of just calling the revised `sanitize_hex_color()` above.
     27
     28FYI: My reason for suggesting the simplification is because the example regex in the ticket description will incorrectly allow a six digit hex code with a single alpha value, i.e. `#123456f`. Things get more complicated regex-wise from there.