WP_HTML_Open_Elements::clear_to_table_body_context()publicWP 6.7.0

Clear the stack back to a table body context.

When the steps above require the UA to clear the stack back to a table body context, it > means that the UA must, while the current node is not a tbody, tfoot, thead, template, or > html element, pop elements from the stack of open elements.

Метод класса: WP_HTML_Open_Elements{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WP_HTML_Open_Elements = new WP_HTML_Open_Elements();
$WP_HTML_Open_Elements->clear_to_table_body_context(): void;

Заметки

Список изменений

С версии 6.7.0 Введена.

Код WP_HTML_Open_Elements::clear_to_table_body_context() WP 6.7.1

public function clear_to_table_body_context(): void {
	foreach ( $this->walk_up() as $item ) {
		if (
			'TBODY' === $item->node_name ||
			'TFOOT' === $item->node_name ||
			'THEAD' === $item->node_name ||
			'TEMPLATE' === $item->node_name ||
			'HTML' === $item->node_name
		) {
			break;
		}
		$this->pop();
	}
}