WP_HTML_Open_Elements::has_element_in_table_scope │ public │ WP 6.4.0

Returns whether a particular element is in table scope.

The stack of open elements is said to have a particular element > in table scope when it has that element in the specific scope > consisting of the following element types: > > - html in the HTML namespace > - table in the HTML namespace > - template in the HTML namespace

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

Хуков нет.

Возвращает

bool. Whether given element is in scope.

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

$WP_HTML_Open_Elements = new WP_HTML_Open_Elements();
$WP_HTML_Open_Elements->has_element_in_table_scope( $tag_name ): bool;
$tag_name(строка) (обязательный)
Name of tag to check.

Заметки

Смотрите: https://html.spec.whatwg.org/#has-an-element-in-table-scope

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

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

Код WP_HTML_Open_Elements::has_element_in_table_scope() WP 7.1.3

public function has_element_in_table_scope( string $tag_name ): bool {
	return $this->has_element_in_specific_scope(
		$tag_name,
		array(
			'HTML',
			'TABLE',
			'TEMPLATE',
		)
	);
}