WP_HTML_Token::__construct()
Constructor - creates a reference to a token in some external HTML string.
Метод класса: WP_HTML_Token{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WP_HTML_Token = new WP_HTML_Token(); $WP_HTML_Token->__construct( $bookmark_name, $node_name, $has_self_closing_flag, $on_destroy );
- $bookmark_name(строка) (обязательный)
- Name of bookmark corresponding to location in HTML where token is found.
- $node_name(строка) (обязательный)
- Name of node token represents; if uppercase, an HTML element; if lowercase, a special value like "marker".
- $has_self_closing_flag(true|false) (обязательный)
- Whether the source token contains the self-closing flag, regardless of whether it's valid.
- $on_destroy(callable)
- Function to call when destroying token, useful for releasing the bookmark.
По умолчанию: null
Список изменений
С версии 6.4.0 | Введена. |
Код WP_HTML_Token::__construct() WP HTML Token:: construct WP 6.6.2
public function __construct( $bookmark_name, $node_name, $has_self_closing_flag, $on_destroy = null ) { $this->bookmark_name = $bookmark_name; $this->node_name = $node_name; $this->has_self_closing_flag = $has_self_closing_flag; $this->on_destroy = $on_destroy; }