wp-includes/html-api/class-wp-html-tag-processor.php:2717Move the internal cursor in the Tag Processor to a given bookmark's location.
$bookmark_namestringbool public function seek( $bookmark_name ): bool { if ( ! array_key_exists( $bookmark_name, $this->bookmarks ) ) { _doing_it_wrong( __METHOD__, __( 'Unknown bookmark name.' ), '6.2.0' ); return false; } $existing_bookmark = $this->bookmarks[ $bookmark_name ]; if ( $this->token_starts_at === $existing_bookmark->start && $this->token_length === $existing_bookmark->length ) { return true; } if ( ++$this->seek_count > static::MAX_SEEK_OPS ) { _doing_it_wrong( __METHOD__, __( 'Too many calls to seek() - this can lead to performance issues.' ), '6.2.0' ); return false; } // Flush out any pending updates to the document. $this->get_updated_html(); // Point this tag processor before the sought tag opener and consume it. $this->bytes_already_parsed = $this->bookmarks[ $bookmark_name ]->start; $this->parser_state = self::STATE_READY; return $this->next_token(); }Introduced in 6.2.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/html-api/class-wp-html-tag-processor.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.