WP_HTML_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_Processor{}
Хуков нет.
Возвращает
Строку|null
.
Использование
$WP_HTML_Processor = new WP_HTML_Processor(); $WP_HTML_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.6.0 | Введена. |
С версии 6.6.0 | Subclassed for the HTML Processor. |
Код WP_HTML_Processor::get_comment_type() WP HTML Processor::get comment type WP 6.8.1
public function get_comment_type(): ?string { return $this->is_virtual() ? null : parent::get_comment_type(); }