WP_HTML_Processor::has_class()publicWP 6.6.0

Returns if a matched tag contains the given ASCII case-insensitive class name.

Method of the class: WP_HTML_Processor{}

No Hooks.

Return

true|false|null. Whether the matched tag contains the given class name, or null if not matched.

Usage

$WP_HTML_Processor = new WP_HTML_Processor();
$WP_HTML_Processor->has_class( $wanted_class );
$wanted_class(string) (required)
Look for this CSS class name, ASCII case-insensitive.

Changelog

Since 6.6.0 Introduced.
Since 6.6.0 Subclassed for the HTML Processor.

WP_HTML_Processor::has_class() code WP 6.6.2

public function has_class( $wanted_class ) {
	return $this->is_virtual() ? null : parent::has_class( $wanted_class );
}