Title: WP_HTML_Processor::bookmark_token
Published: April 3, 2024
Last modified: February 24, 2026

---

# WP_HTML_Processor::bookmark_token(): string|false

## In this article

 * [Return](https://developer.wordpress.org/reference/classes/wp_html_processor/bookmark_token/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_html_processor/bookmark_token/?output_format=md#source)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_html_processor/bookmark_token/?output_format=md#changelog)

This function’s access is marked private. This means it is not intended for use 
by plugin or theme developers, only by core. It is listed here for completeness.

Creates a new bookmark for the currently-matched token and returns the generated
name.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_html_processor/bookmark_token/?output_format=md#return)󠁿

 string|false Name of created bookmark, or false if unable to create.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_html_processor/bookmark_token/?output_format=md#source)󠁿

    ```php
     * Internal helpers
     */

    /**
     * Creates a new bookmark for the currently-matched token and returns the generated name.
     *
     * @since 6.4.0
     * @since 6.5.0 Renamed from bookmark_tag() to bookmark_token().
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/html-api/class-wp-html-processor.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/html-api/class-wp-html-processor.php#L5107)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/html-api/class-wp-html-processor.php#L5107-L5114)

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_html_processor/bookmark_token/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.5.0](https://developer.wordpress.org/reference/since/6.5.0/) | Renamed from bookmark_tag() to bookmark_token(). | 
| [6.4.0](https://developer.wordpress.org/reference/since/6.4.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_html_processor%2Fbookmark_token%2F)
before being able to contribute a note or feedback.