WP_HTML_Processor::is_virtualprivateWP 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.

Returns

true|false. Whether the current token is virtual.

Usage

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

Changelog

Since 6.6.0 Introduced.

WP_HTML_Processor::is_virtual() code WP 7.0

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