Generator for a foreach loop to step through each class name for the matched tag.
Description
This generator function is designed to be used inside a “foreach” loop.
$p = WP_HTML_Processor::create_fragment( "<div class='free <egg>\tlang-en'>" );
$p->next_tag();
foreach ( $p->class_list() as $class_name ) {
var_dump( $class_name );
}Source
public function class_list() {
return $this->is_virtual() ? null : parent::class_list();
}
Changelog
| Version | Description |
|---|---|
| 6.6.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.