sanitize_hex_color


sanitize_hex_color ( $color )

Parameters:
  • (string) color
Returns:
  • (string|void)
Defined at:

Description

Sanitizes a hex color.Returns either '', a 3 or 6 digit hex color (with #), or nothing. For sanitizing values without a #, see sanitize_hex_color_no_hash().

Related Functions

sanitize_hex_color_no_hash, sanitize_term, sanitize_user, sanitize_html_class, sanitize_text_field

Top Google Results

User discussions

wpseek mobile