W3cubDocs

/WordPress

WP_HTML_Processor::has_class( string $wanted_class ): bool|null

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

Parameters

$wanted_classstringrequired
Look for this CSS class name, ASCII case-insensitive.

Return

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

Source

*
* @since 6.7.0 Stub implementation.
*

Changelog

Version Description
6.6.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_html_processor/has_class