sanitize_html_class filter-hookWP 2.8.0

Filters a sanitized HTML class string.

Usage

add_filter( 'sanitize_html_class', 'wp_kama_sanitize_html_class_filter', 10, 3 );

/**
 * Function for `sanitize_html_class` filter-hook.
 * 
 * @param string $sanitized The sanitized HTML class.
 * @param string $class     HTML class before sanitization.
 * @param string $fallback  The fallback string.
 *
 * @return string
 */
function wp_kama_sanitize_html_class_filter( $sanitized, $class, $fallback ){

	// filter...
	return $sanitized;
}
$sanitized(string)
The sanitized HTML class.
$class(string)
HTML class before sanitization.
$fallback(string)
The fallback string.

Changelog

Since 2.8.0 Introduced.

Where the hook is called

sanitize_html_class()
sanitize_html_class
wp-includes/formatting.php 2419
return apply_filters( 'sanitize_html_class', $sanitized, $class, $fallback );

Where the hook is used in WordPress

Usage not found.