WP_HTML_Open_Elements::clear_to_table_context
Clear the stack back to a table context.
When the steps above require the UA to clear the stack back to a table context, it means > that the UA must, while the current node is not a table, template, or html element, pop > elements from the stack of open elements.
Method of the class: WP_HTML_Open_Elements{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WP_HTML_Open_Elements = new WP_HTML_Open_Elements(); $WP_HTML_Open_Elements->clear_to_table_context(): void;
Notes
Changelog
| Since 6.7.0 | Introduced. |
WP_HTML_Open_Elements::clear_to_table_context() WP HTML Open Elements::clear to table context code WP 6.9.1
public function clear_to_table_context(): void {
foreach ( $this->walk_up() as $item ) {
if (
'TABLE' === $item->node_name ||
'TEMPLATE' === $item->node_name ||
'HTML' === $item->node_name
) {
break;
}
$this->pop();
}
}