- Timestamp:
- 10/23/2024 10:03:23 PM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/html-api/class-wp-html-processor.php
r59248 r59285 605 605 606 606 /** 607 * Ensures internal accounting is maintained for HTML semantic rules while 608 * the underlying Tag Processor class is seeking to a bookmark. 607 * Finds the next token in the HTML document. 609 608 * 610 609 * This doesn't currently have a way to represent non-tags and doesn't process … … 613 612 * 614 613 * @since 6.5.0 Added for internal support; do not use. 614 * @since 6.7.1 Refactored so subclasses may extend. 615 * 616 * @return bool Whether a token was parsed. 617 */ 618 public function next_token(): bool { 619 return $this->_next_token(); 620 } 621 622 /** 623 * Ensures internal accounting is maintained for HTML semantic rules while 624 * the underlying Tag Processor class is seeking to a bookmark. 625 * 626 * This doesn't currently have a way to represent non-tags and doesn't process 627 * semantic rules for text nodes. For access to the raw tokens consider using 628 * WP_HTML_Tag_Processor instead. 629 * 630 * @since 6.7.1 Added for internal support; do not use. 615 631 * 616 632 * @access private … … 618 634 * @return bool 619 635 */ 620 p ublic functionnext_token(): bool {636 private function _next_token(): bool { 621 637 $this->current_element = null; 622 638 … … 636 652 */ 637 653 if ( empty( $this->element_queue ) && $this->step() ) { 638 return $this-> next_token();654 return $this->_next_token(); 639 655 } 640 656 … … 647 663 } 648 664 649 return empty( $this->element_queue ) ? false : $this-> next_token();665 return empty( $this->element_queue ) ? false : $this->_next_token(); 650 666 } 651 667 … … 658 674 */ 659 675 if ( 'root-node' === $this->current_element->token->bookmark_name ) { 660 return $this-> next_token();676 return $this->_next_token(); 661 677 } 662 678 … … 670 686 // Avoid sending close events for elements which don't expect a closing. 671 687 if ( $is_pop && ! $this->expects_closer( $this->current_element->token ) ) { 672 return $this-> next_token();688 return $this->_next_token(); 673 689 } 674 690
Note: See TracChangeset
for help on using the changeset viewer.