WP_HTML_Decoder
- Since
- 6.6.0
- Source
wp-includes/html-api/class-wp-html-decoder.php:12
HTML API: WP_HTML_Decoder class
Description
Decodes spans of raw text found inside HTML content.
Compatibility
- WordPress
- since 6.6.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Methods · 6
- attribute_starts_with()Indicates if an attribute value starts with a given raw string value.
- decode_text_node()Returns a string containing the decoded value of a given HTML text node.
- decode_attribute()Returns a string containing the decoded value of a given HTML attribute.
- decode()Decodes a span of HTML text, depending on the context in which it's found.
- read_character_reference()Attempt to read a character reference at the given location in a given string, depending on the context in which it's found.
- code_point_to_utf8_bytes()Encode a code point number into the UTF-8 encoding.
Changelog
Introduced in 6.6.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 tag, from
src/wp-includes/html-api/class-wp-html-decoder.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.