WP_HTML_Tag_Processor::get_comment_type()
Indicates what kind of comment produced the comment node.
Because there are different kinds of HTML syntax which produce comments, the Tag Processor tracks and exposes this as a type for the comment. Nominally only regular HTML comments exist as they are commonly known, but a number of unrelated syntax errors also produce comments.
Метод класса: WP_HTML_Tag_Processor{}
Хуков нет.
Возвращает
Строку|null
.
Использование
$WP_HTML_Tag_Processor = new WP_HTML_Tag_Processor(); $WP_HTML_Tag_Processor->get_comment_type(): ?string;
Заметки
- Смотрите: self::COMMENT_AS_ABRUPTLY_CLOSED_COMMENT
- Смотрите: self::COMMENT_AS_CDATA_LOOKALIKE
- Смотрите: self::COMMENT_AS_INVALID_HTML
- Смотрите: self::COMMENT_AS_HTML_COMMENT
- Смотрите: self::COMMENT_AS_PI_NODE_LOOKALIKE
Список изменений
С версии 6.5.0 | Введена. |
Код WP_HTML_Tag_Processor::get_comment_type() WP HTML Tag Processor::get comment type WP 6.8.1
public function get_comment_type(): ?string { if ( self::STATE_COMMENT !== $this->parser_state ) { return null; } return $this->comment_type; }