function sanitize_hex_color_no_hash( $color ) { $color =
ltrim( $color, '#'
);
if ( '' ===
$color ) { return '';
} return sanitize_hex_color( '#' .
$color ) ?
$color : null;
}/**
* 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().
*
* @since 3.4.0
*
* @param string $color
* @return string
*/