Closes elements that have implied end tags.
Description
See also
Parameters
$except_for_this_elementstring|nulloptional- Perform as if this element doesn’t exist in the stack of open elements.
Default:
null
Source
* like "start-of-section" or "last-paragraph".
*
* Bookmarks are a powerful tool to enable complicated behavior.
* Consider double-checking that you need this tool if you are
* reaching for it, as inappropriate use could lead to broken
* HTML structure or unwanted processing overhead.
*
* Bookmarks cannot be set on tokens that do no appear in the original
* HTML text. For example, the HTML `<table><td>` stops at tags `TABLE`,
* `TBODY`, `TR`, and `TD`. The `TBODY` and `TR` tags do not appear in
* the original HTML and cannot be used as bookmarks.
*
* @since 6.4.0
*
* @param string $bookmark_name Identifies this particular bookmark.
* @return bool Whether the bookmark was successfully created.
*/
public function set_bookmark( $bookmark_name ): bool {
if ( $this->is_virtual() ) {
_doing_it_wrong(
__METHOD__,
__( 'Cannot set bookmarks on tokens that do no appear in the original HTML text.' ),
'6.8.0'
User Contributed Notes
You must log in before being able to contribute a note or feedback.