WP_HTML_Open_Elements::has_element_in_scope( string $tag_name ): bool

Returns whether a particular element is in scope.

Description

See also

Parameters

$tag_namestringrequired
Name of tag to check.

Return

bool Whether given element is in scope.

Source

public function has_element_in_scope( $tag_name ) {
	return $this->has_element_in_specific_scope(
		$tag_name,
		array(

			/*
			 * Because it's not currently possible to encounter
			 * one of the termination elements, they don't need
			 * to be listed here. If they were, they would be
			 * unreachable and only waste CPU cycles while
			 * scanning through HTML.
			 */
		)
	);
}

Changelog

VersionDescription
6.4.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.