- Timestamp:
- 09/04/2024 07:23:48 PM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/html-api/class-wp-html-open-elements.php
r58867 r58992 531 531 532 532 /** 533 * Pops nodes off of the stack of open elements until one with the given tagname has been popped.533 * Pops nodes off of the stack of open elements until an HTML tag with the given name has been popped. 534 534 * 535 535 * @since 6.4.0 … … 537 537 * @see WP_HTML_Open_Elements::pop 538 538 * 539 * @param string $ tag_name Name of tag that needs to be popped off of the stack of open elements.539 * @param string $html_tag_name Name of tag that needs to be popped off of the stack of open elements. 540 540 * @return bool Whether a tag of the given name was found and popped off of the stack of open elements. 541 541 */ 542 public function pop_until( string $ tag_name ): bool {542 public function pop_until( string $html_tag_name ): bool { 543 543 foreach ( $this->walk_up() as $item ) { 544 if ( 'context-node' === $item->bookmark_name ) {545 return true;546 }547 548 544 $this->pop(); 549 545 546 if ( 'html' !== $item->namespace ) { 547 continue; 548 } 549 550 550 if ( 551 '(internal: H1 through H6 - do not use)' === $ tag_name &&551 '(internal: H1 through H6 - do not use)' === $html_tag_name && 552 552 in_array( $item->node_name, array( 'H1', 'H2', 'H3', 'H4', 'H5', 'H6' ), true ) 553 553 ) { … … 555 555 } 556 556 557 if ( $ tag_name === $item->node_name ) {557 if ( $html_tag_name === $item->node_name ) { 558 558 return true; 559 559 }
Note: See TracChangeset
for help on using the changeset viewer.