WP_HTML_Processor::next_tokenpublicWP 6.5.0

Finds the next token in the HTML document.

This doesn't currently have a way to represent non-tags and doesn't process semantic rules for text nodes. For access to the raw tokens consider using WP_HTML_Tag_Processor instead.

Method of the class: WP_HTML_Processor{}

No Hooks.

Returns

true|false. Whether a token was parsed.

Usage

$WP_HTML_Processor = new WP_HTML_Processor();
$WP_HTML_Processor->next_token(): bool;

Changelog

Since 6.5.0 Introduced.
Since 6.5.0 Added for internal support; do not use.
Since 6.7.2 Refactored so subclasses may extend.

WP_HTML_Processor::next_token() code WP 6.8.1

public function next_token(): bool {
	return $this->next_visitable_token();
}