function outdatedbrowser_valid_hexadecimal_string in Outdated Browser 7
Checks, if a hexadecimal CSS color string is valid.
2 calls to outdatedbrowser_valid_hexadecimal_string()
- outdatedbrowser_element_validate_colour in ./
outdatedbrowser.admin.inc - Element validation callback: validate hexadecimal colour code.
- outdatedbrowser_variable_validate_colour in ./
outdatedbrowser.variable.inc - Validate hexadecimal colour code.
File
- ./
outdatedbrowser.module, line 162 - Outdated Browser module file.
Code
function outdatedbrowser_valid_hexadecimal_string($color) {
return preg_match('/^#([a-f0-9]{3}){1,2}$/iD', $color);
}