确保正确散列任何十六进制颜色。
原型
maybe_hash_hex_color( string $color )
描述
否则,返回值不变。
参数
$color
(string)
(Required)
返回值
(string)
源文件
路径:wp-includes/formatting.php
<?php
...
function maybe_hash_hex_color( $color ) {
if ( $unhashed = sanitize_hex_color_no_hash( $color ) ) {
return '#' . $unhashed;
}
return $color;
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/maybe_hash_hex_color/