WP_HTML_Processor::has_bookmarkpublicWP 6.5.0

Checks whether a bookmark with the given name exists.

Method of the class: WP_HTML_Processor{}

No Hooks.

Returns

true|false. Whether that bookmark exists.

Usage

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

Changelog

Since 6.5.0 Introduced.

WP_HTML_Processor::has_bookmark() code WP 6.8.1

public function has_bookmark( $bookmark_name ): bool {
	return parent::has_bookmark( "_{$bookmark_name}" );
}