WP_HTML_Processor::generate_implied_end_tags_thoroughly
Closes elements that have implied end tags, thoroughly.
See the HTML specification for an explanation why this is different from generating end tags in the normal sense.
Метод класса: WP_HTML_Processor{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->generate_implied_end_tags_thoroughly(): void;
Заметки
- Смотрите: WP_HTML_Processor::generate_implied_end_tags
- Смотрите: https://html.spec.whatwg.org/#generate-implied-end-tags
Список изменений
| С версии 6.4.0 | Введена. |
| С версии 6.7.0 | Full spec support. |
Код WP_HTML_Processor::generate_implied_end_tags_thoroughly() WP HTML Processor::generate implied end tags thoroughly WP 6.8.3
private function generate_implied_end_tags_thoroughly(): void {
$elements_with_implied_end_tags = array(
'CAPTION',
'COLGROUP',
'DD',
'DT',
'LI',
'OPTGROUP',
'OPTION',
'P',
'RB',
'RP',
'RT',
'RTC',
'TBODY',
'TD',
'TFOOT',
'TH',
'THEAD',
'TR',
);
while ( in_array( $this->state->stack_of_open_elements->current_node()->node_name, $elements_with_implied_end_tags, true ) ) {
$this->state->stack_of_open_elements->pop();
}
}