Changeset 57582
- Timestamp:
- 02/10/2024 10:52:28 PM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/html-api/class-wp-html-processor.php
r57528 r57582 1238 1238 */ 1239 1239 public function seek( $bookmark_name ) { 1240 // Flush any pending updates to the document before beginning. 1241 $this->get_updated_html(); 1242 1240 1243 $actual_bookmark_name = "_{$bookmark_name}"; 1241 1244 $processor_started_at = $this->state->current_token … … 1247 1250 switch ( $direction ) { 1248 1251 case 'forward': 1249 // When moving forwards, re -parse the document until reaching the same location as the original bookmark.1252 // When moving forwards, reparse the document until reaching the same location as the original bookmark. 1250 1253 while ( $this->step() ) { 1251 1254 if ( $bookmark_starts_at === $this->bookmarks[ $this->state->current_token->bookmark_name ]->start ) { … … 1367 1370 public function set_bookmark( $bookmark_name ) { 1368 1371 return parent::set_bookmark( "_{$bookmark_name}" ); 1372 } 1373 1374 /** 1375 * Checks whether a bookmark with the given name exists. 1376 * 1377 * @since 6.5.0 1378 * 1379 * @param string $bookmark_name Name to identify a bookmark that potentially exists. 1380 * @return bool Whether that bookmark exists. 1381 */ 1382 public function has_bookmark( $bookmark_name ) { 1383 return parent::has_bookmark( "_{$bookmark_name}" ); 1369 1384 } 1370 1385
Note: See TracChangeset
for help on using the changeset viewer.