Skip to content

Commit

Permalink
Add has_bookmark method
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Feb 9, 2023
1 parent df3b34d commit 50f4305
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1481,6 +1481,18 @@ private function apply_attributes_updates() {
$this->lexical_updates = array();
}

/**
* Whether a bookmark with the given name exists.
*
* @since 6.3.0
*
* @param string $bookmark_name Name to identify a bookmark that potentially exists.
* @return bool Whether that bookmark exists.
*/
public function has_bookmark( $bookmark_name ) {
return array_key_exists( $bookmark_name, $this->bookmarks );
}

/**
* Move the internal cursor in the Tag Processor to a given bookmark's location.
*
Expand Down

0 comments on commit 50f4305

Please sign in to comment.