- Timestamp:
- 08/07/2023 01:48:55 PM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/html-api/class-wp-html-open-elements.php
r56274 r56363 111 111 * @return bool Whether the element was found in a specific scope. 112 112 */ 113 public function has_element_in_specific_scope( $tag_name, $termination_list ) { 113 public function has_element_in_specific_scope( $tag_name, $termination_list ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable 114 114 foreach ( $this->walk_up() as $node ) { 115 115 if ( $node->node_name === $tag_name ) { … … 135 135 $tag_name, 136 136 array( 137 137 138 /* 138 139 * Because it's not currently possible to encounter … … 153 154 * @see https://html.spec.whatwg.org/#has-an-element-in-list-item-scope 154 155 * 156 * @throws WP_HTML_Unsupported_Exception Always until this function is implemented. 157 * 155 158 * @param string $tag_name Name of tag to check. 156 159 * @return bool Whether given element is in scope. 157 160 */ 158 public function has_element_in_list_item_scope( $tag_name ) { 161 public function has_element_in_list_item_scope( $tag_name ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable 159 162 throw new WP_HTML_Unsupported_Exception( 'Cannot process elements depending on list item scope.' ); 163 164 return false; // The linter requires this unreachable code until the function is implemented and can return. 160 165 } 161 166 … … 174 179 $tag_name, 175 180 array( 181 176 182 /* 177 183 * Because it's not currently possible to encounter … … 192 198 * @see https://html.spec.whatwg.org/#has-an-element-in-table-scope 193 199 * 200 * @throws WP_HTML_Unsupported_Exception Always until this function is implemented. 201 * 194 202 * @param string $tag_name Name of tag to check. 195 203 * @return bool Whether given element is in scope. 196 204 */ 197 public function has_element_in_table_scope( $tag_name ) { 205 public function has_element_in_table_scope( $tag_name ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable 198 206 throw new WP_HTML_Unsupported_Exception( 'Cannot process elements depending on table scope.' ); 207 208 return false; // The linter requires this unreachable code until the function is implemented and can return. 199 209 } 200 210 … … 205 215 * 206 216 * @see https://html.spec.whatwg.org/#has-an-element-in-select-scope 217 * 218 * @throws WP_HTML_Unsupported_Exception Always until this function is implemented. 207 219 * 208 220 * @param string $tag_name Name of tag to check. 209 221 * @return bool Whether given element is in scope. 210 222 */ 211 public function has_element_in_select_scope( $tag_name ) { 223 public function has_element_in_select_scope( $tag_name ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable 212 224 throw new WP_HTML_Unsupported_Exception( 'Cannot process elements depending on select scope.' ); 225 226 return false; // The linter requires this unreachable code until the function is implemented and can return. 213 227 } 214 228 … … 220 234 * @see https://html.spec.whatwg.org/#has-an-element-in-button-scope 221 235 * 222 * @return bool 236 * @return bool Whether a P is in BUTTON scope. 223 237 */ 224 238 public function has_p_in_button_scope() { … … 321 335 * 322 336 * To start with the most-recently added element and walk towards the top, 323 * @see WP_HTML_Open_Elements::walk_up337 * see WP_HTML_Open_Elements::walk_up(). 324 338 * 325 339 * @since 6.4.0 … … 348 362 * 349 363 * To start with the first added element and walk towards the bottom, 350 * @see WP_HTML_Open_Elements::walk_down364 * see WP_HTML_Open_Elements::walk_down(). 351 365 * 352 366 * @since 6.4.0
Note: See TracChangeset
for help on using the changeset viewer.