Glossary Term
sanitize_html_class()
3 tags
1 category
sanitize_html_class() — Sanitizes an HTML classname to ensure it only contains valid characters. Strips the string down to A-Z,a-z,0-9,_,-. If this results in an empty string then it will return the alternative value supplied.
Inputs: $classname (string): The classname to be sanitized. $fallback (string): Optional. The value to return if the sanitization ends up as an empty string. Default empty string.
Returns string: The sanitized value.
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
