apply_filters( 'sanitize_html_class', string $sanitized, string $classname, string $fallback )
- Since
- 2.8.0
Filters a sanitized HTML class string.
Compatibility
- WordPress
- since 2.8.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$sanitizedstring- The sanitized HTML class.
$classnamestring- HTML class before sanitization.
$fallbackstring- The fallback string.
Where this hook fires · 1
wp-includes/formatting.php:2457sanitize_html_class()
Source code
* @since 2.8.0 * * @param string $sanitized The sanitized HTML class. * @param string $classname HTML class before sanitization. * @param string $fallback The fallback string. */ return apply_filters( 'sanitize_html_class', $sanitized, $classname, $fallback );} /** * Strips out all characters not allowed in a locale name. * * @since 6.2.1Changelog
Introduced in 2.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.