WP_HTML_Tag_Processor::is_tag_closer()
Indicates if the current tag token is a tag closer.
Example:
$p = new WP_HTML_Tag_Processor( '<div></div>' ); $p->next_tag( array( 'tag_name' => 'div', 'tag_closers' => 'visit' ) ); $p->is_tag_closer() === false;
$p->next_tag( array( 'tag_name' => 'div', 'tag_closers' => 'visit' ) ); $p->is_tag_closer() === true;
Метод класса: WP_HTML_Tag_Processor{}
Хуков нет.
Возвращает
true|false
. Whether the current tag is a tag closer.
Использование
$WP_HTML_Tag_Processor = new WP_HTML_Tag_Processor(); $WP_HTML_Tag_Processor->is_tag_closer();
Список изменений
С версии 6.2.0 | Введена. |
Код WP_HTML_Tag_Processor::is_tag_closer() WP HTML Tag Processor::is tag closer WP 6.6.2
public function is_tag_closer() { return ( self::STATE_MATCHED_TAG === $this->parser_state && $this->is_closing_tag ); }