- Timestamp:
- 08/10/2023 08:35:55 AM (14 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/html-api/class-wp-html-open-elements.php
r56363 r56380 114 114 foreach ( $this->walk_up() as $node ) { 115 115 if ( $node->node_name === $tag_name ) { 116 return true; 117 } 118 119 switch ( $node->node_name ) { 120 case 'HTML': 121 return false; 122 } 123 124 if ( in_array( $node->node_name, $termination_list, true ) ) { 116 125 return true; 117 126 } … … 176 185 */ 177 186 public function has_element_in_button_scope( $tag_name ) { 178 return $this->has_element_in_specific_scope( 179 $tag_name, 180 array( 181 182 /* 183 * Because it's not currently possible to encounter 184 * one of the termination elements, they don't need 185 * to be listed here. If they were, they would be 186 * unreachable and only waste CPU cycles while 187 * scanning through HTML. 188 */ 189 ) 190 ); 187 return $this->has_element_in_specific_scope( $tag_name, array( 'BUTTON' ) ); 191 188 } 192 189 … … 395 392 */ 396 393 switch ( $item->node_name ) { 394 case 'BUTTON': 395 $this->has_p_in_button_scope = false; 396 break; 397 397 398 case 'P': 398 399 $this->has_p_in_button_scope = true; … … 420 421 */ 421 422 switch ( $item->node_name ) { 423 case 'BUTTON': 424 $this->has_p_in_button_scope = $this->has_element_in_button_scope( 'P' ); 425 break; 426 422 427 case 'P': 423 428 $this->has_p_in_button_scope = $this->has_element_in_button_scope( 'P' );
Note: See TracChangeset
for help on using the changeset viewer.