maybe_hash_hex_color()
最后更新于:2021-11-27 14:42:42
maybe_hash_hex_color( string$color)Ensures that any hex color is properly hashed.
参数
- $color
-
(string) (Required)
响应
(string)
源文件
文件: gc-includes/formatting.php
function maybe_hash_hex_color( $color ) {
$unhashed = sanitize_hex_color_no_hash( $color );
if ( $unhashed ) {
return '#' . $unhashed;
}
return $color;
}