Indicates the kind of matched token, if any.
Description
This differs from get_token_name() in that it always returns a static string indicating the type, whereas get_token_name() may return values derived from the token itself, such as a tag name or processing instruction tag.
Possible values:
#tagwhen matched on a tag.#textwhen matched on a text node.#cdata-sectionwhen matched on a CDATA node.#commentwhen matched on a comment.#doctypewhen matched on a DOCTYPE declaration.#presumptuous-tagwhen matched on an empty tag closer.#funky-commentwhen matched on a funky comment.
Source
* ¹ ²
* 1. Attribute `boolean-attribute` is `true`.
* 2. Attribute `empty-attribute` is `""`.
*/
if ( true === $attribute->is_true ) {
return true;
}
$raw_value = substr( $this->html, $attribute->value_starts_at, $attribute->value_length );
return WP_HTML_Decoder::decode_attribute( $raw_value );
}
Changelog
| Version | Description |
|---|---|
| 6.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.