WP_HTML_Open_Elements::has_element_in_list_item_scope( string $tag_name ): bool

Returns whether a particular element is in list item scope.

Description

See also

Parameters

$tag_namestringrequired
Name of tag to check.

Return

bool Whether given element is in scope.

Source

/**
 * Returns the node at the end of the stack of open elements,
 * if one exists. If the stack is empty, returns null.
 *
 * @since 6.4.0
 *
 * @return WP_HTML_Token|null Last node in the stack of open elements, if one exists, otherwise null.
 */
public function current_node(): ?WP_HTML_Token {
	$current_node = end( $this->stack );

Changelog

VersionDescription
6.5.0Implemented: no longer throws on every invocation.
6.4.0Introduced.

User Contributed Notes

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