Skip to content

Commit afbe174

Browse files
Docs: Add @param and @return description for sanitize_hex_color_no_hash().
Follow-up to [20936], [21354], [37283], [60709]. Props rollybueno, SergeyBiryukov. See #63166. git-svn-id: https://develop.svn.wordpress.org/trunk@60714 602fd350-edb4-49c9-b593-d223f7449a82
1 parent a316966 commit afbe174

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/wp-includes/formatting.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6411,8 +6411,9 @@ function sanitize_hex_color( $color ) {
64116411
*
64126412
* @since 3.4.0
64136413
*
6414-
* @param string $color
6415-
* @return string|null
6414+
* @param string $color The color value to sanitize. Can be with or without a #.
6415+
* @return string|null The sanitized hex color without the hash prefix,
6416+
* empty string if input is empty, or null if invalid.
64166417
*/
64176418
function sanitize_hex_color_no_hash( $color ) {
64186419
$color = ltrim( $color, '#' );

0 commit comments

Comments
 (0)