maybe_hash_hex_color
maybe_hash_hex_color ( $color )
Parameters:- (string) color The color value to add the hash prefix to. Can be with or without a #.
Returns:- (string) The color with the hash prefix if it's a valid hex color,
otherwise the original value.
Defined at: - Introduced in WordPress: 3.4.0
- Deprecated in WordPress: —
Description
Ensures that any hex color is properly hashed.Otherwise, returns value untouched.
This method should only be necessary if using sanitize_hex_color_no_hash().