W3cubDocs

/WordPress

WP_HTML_Processor::add_class( string $class_name ): bool

Adds a new class name to the currently matched tag.

Parameters

$class_namestringrequired
The class name to add.

Return

bool Whether the class was set to be added.

Source


/*
 * > A start tag whose tag name is "head"

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/add_class