WP_HTML_Processor::class_list()
Generator for a foreach loop to step through each class name for the matched tag.
This generator function is designed to be used inside a "foreach" loop.
Example:
$p = WP_HTML_Processor::create_fragment( "<div class='free <egg<\tlang-en'>" ); $p->next_tag(); foreach ( $p->class_list() as $class_name ) { echo "{$class_name} "; } // Outputs: "free <egg> lang-en "
Method of the class: WP_HTML_Processor{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WP_HTML_Processor = new WP_HTML_Processor(); $WP_HTML_Processor->class_list();
Changelog
Since 6.6.0 | Introduced. |
Since 6.6.0 | Subclassed for the HTML Processor. |
WP_HTML_Processor::class_list() WP HTML Processor::class list code WP 6.6.2
public function class_list() { return $this->is_virtual() ? null : parent::class_list(); }