WP_HTML_Tag_Processor::has_bookmark()publicWP 6.3.0

Checks whether a bookmark with the given name exists.

Method of the class: WP_HTML_Tag_Processor{}

No Hooks.

Return

true|false. Whether that bookmark exists.

Usage

$WP_HTML_Tag_Processor = new WP_HTML_Tag_Processor();
$WP_HTML_Tag_Processor->has_bookmark( $bookmark_name );
$bookmark_name(string) (required)
Name to identify a bookmark that potentially exists.

Changelog

Since 6.3.0 Introduced.

WP_HTML_Tag_Processor::has_bookmark() code WP 6.6.2

public function has_bookmark( $bookmark_name ) {
	return array_key_exists( $bookmark_name, $this->bookmarks );
}