Title: WP_HTML_Tag_Processor::release_bookmark
Published: March 29, 2023
Last modified: August 20, 2026

---

# WP_HTML_Tag_Processor::release_bookmark( string $name ): bool

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/release_bookmark/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/release_bookmark/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/release_bookmark/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/release_bookmark/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/release_bookmark/?output_format=md#related)

Removes a bookmark that is no longer needed.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/release_bookmark/?output_format=md#description)󠁿

Releasing a bookmark frees up the small performance overhead it requires.

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/release_bookmark/?output_format=md#parameters)󠁿

 `$name`stringrequired

Name of the bookmark to remove.

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

 bool Whether the bookmark already existed before removal.

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

    ```php
    public function release_bookmark( $name ): bool {
    	if ( ! array_key_exists( $name, $this->bookmarks ) ) {
    		return false;
    	}

    	unset( $this->bookmarks[ $name ] );

    	return true;
    }
    ```

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

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/release_bookmark/?output_format=md#related)󠁿

| Used by | Description | 
| [WP_HTML_Processor::release_bookmark()](https://developer.wordpress.org/reference/classes/wp_html_processor/release_bookmark/)`wp-includes/html-api/class-wp-html-processor.php` |

Removes a bookmark that is no longer needed.

  | 
| [WP_HTML_Processor::__construct()](https://developer.wordpress.org/reference/classes/wp_html_processor/__construct/)`wp-includes/html-api/class-wp-html-processor.php` |

Constructor.

  |

## User Contributed Notes

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