Returns whether an element is in a specific scope.
Description
HTML Support
This function skips checking for the termination list because there are no supported elements which appear in the termination list.
See also
Parameters
$tag_name
stringrequired- Name of tag check.
$termination_list
string[]required- List of elements that terminate the search.
Source
foreach ( $this->walk_up() as $item ) {
if ( $token->bookmark_name === $item->bookmark_name ) {
return true;
}
}
return false;
}
/**
* Returns how many nodes are currently in the stack of open elements.
*
* @since 6.4.0
*
* @return int How many node are in the stack of open elements.
*/
public function count() {
return count( $this->stack );
}
/**
* 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
Changelog
Version | Description |
---|---|
6.4.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.