wordpress/wp-content/themes/basic/themify/themify-utils.php
/**
 * Sanitize a string to ensure it's valid hex color code
 *
 * @since 3.1.2
 */
Sanitize a string to ensure it's valid hex color code
@since 3.1.2
Sanitize a string to ensure it ' s valid hex color code @since 3 . 1 . 2
function themify_sanitize_hex_color( $value ) {
	$value = ltrim( $value, '#' );
	if ( preg_match('|^([A-Fa-f0-9]{3}){1,2}$|', $value ) ) {
		$value = '#' . $value;
	}
	return $value;
}
function themify_sanitize_hex_color ( $ value ) { $ value = ltrim ( $ value , '#' ) ; if ( preg_match ( '|^([A-Fa-f0-9]{3}){1,2}$|' , $ value ) ) { $ value = '#' . $ value ; } return $ value ; }
Sanitize a string to ensure it's valid hex color code
 @since 3.1.2
Sanitize a string to ensure it ' s valid hex color code @since 3 . 1 . 2
/* match 3 to 6 hex digits */