WP_HTML_Processor::is_virtual()privateWP 6.6.0

Indicates if the currently-matched token is virtual, created by a stack operation while processing HTML, rather than a token found in the HTML text itself.

Method of the class: WP_HTML_Processor{}

No Hooks.

Return

true|false. Whether the current token is virtual.

Usage

// private - for code of main (parent) class only
$result = $this->is_virtual();

Changelog

Since 6.6.0 Introduced.

WP_HTML_Processor::is_virtual() code WP 6.6.2

private function is_virtual() {
	return (
		isset( $this->current_element->provenance ) &&
		'virtual' === $this->current_element->provenance
	);
}