Title: wp-includes/html-api/class-wp-html-tag-processor.php | Developer.WordPress.org

---

# File: wp-includes/html-api/class-wp-html-tag-processor.php

 * method[WP_HTML_Tag_Processor::__wakeup()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/__wakeup/)
 * Wakeup magic method.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/__wakeup/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/__wakeup/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:5074](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L5074-L5076)
 * method[WP_HTML_Tag_Processor::get_doctype_info()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_doctype_info/)
 * Gets DOCTYPE declaration info from a DOCTYPE token.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_doctype_info/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_doctype_info/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:4797](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L4797-L4803)
 * method[WP_HTML_Tag_Processor::get_namespace()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_namespace/)
 * Returns the namespace of the matched token.
 * Used by [5 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_namespace/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_namespace/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:2878](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L2878-L2880)
 * method[WP_HTML_Tag_Processor::get_qualified_tag_name()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_qualified_tag_name/)
 * Returns the adjusted tag name for a given token, taking into account the current
   parsing context, whether HTML, SVG, or MathML.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_qualified_tag_name/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_qualified_tag_name/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:2927](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L2927-L3062)
 * method[WP_HTML_Tag_Processor::get_qualified_attribute_name()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_qualified_attribute_name/)
 * Returns the adjusted attribute name for a given attribute, taking into account
   the current parsing context, whether HTML, SVG, or MathML.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_qualified_attribute_name/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_qualified_attribute_name/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:3074](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L3074-L3302)
 * method[WP_HTML_Tag_Processor::get_full_comment_text()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_full_comment_text/)
 * Returns the text of a matched comment or null if not on a comment type node.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_full_comment_text/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_full_comment_text/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:3497](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L3497-L3529)
 * method[WP_HTML_Tag_Processor::subdivide_text_appropriately()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/subdivide_text_appropriately/)
 * Subdivides a matched text node, splitting NULL byte sequences and decoded whitespace
   as distinct nodes prefixes.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/subdivide_text_appropriately/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/subdivide_text_appropriately/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:3562](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L3562-L3615)
 * method[WP_HTML_Tag_Processor::set_modifiable_text()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/set_modifiable_text/)
 * Sets the modifiable text for the matched token, if matched.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/set_modifiable_text/#used-by)
   | Uses [4 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/set_modifiable_text/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:3785](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L3785-L3930)
 * method[WP_HTML_Tag_Processor::change_parsing_namespace()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/change_parsing_namespace/)
 * Switches parsing mode into a new namespace, such as when encountering an SVG 
   tag and entering foreign content.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/change_parsing_namespace/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/change_parsing_namespace/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:858](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L858-L865)
 * method[WP_HTML_Tag_Processor::get_token_name()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_token_name/)
 * Returns the node name represented by the token.
 * Used by [3 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_token_name/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_token_name/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:3425](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L3425-L3450)
 * method[WP_HTML_Tag_Processor::get_comment_type()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_comment_type/)
 * Indicates what kind of comment produced the comment node.
 * Used by [3 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_comment_type/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_comment_type/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:3471](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L3471-L3477)
 * method[WP_HTML_Tag_Processor::get_modifiable_text()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_modifiable_text/)
 * Returns the modifiable text for a matched token, or an empty string.
 * Used by [2 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_modifiable_text/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_modifiable_text/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:3645](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L3645-L3723)
 * method[WP_HTML_Tag_Processor::get_token_type()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_token_type/)
 * Indicates the kind of matched token, if any.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_token_type/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_token_type/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:3392](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L3392-L3403)
 * method[WP_HTML_Tag_Processor::next_token()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/next_token/)
 * Finds the next token in the HTML document.
 * Used by [3 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/next_token/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/next_token/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:936](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L936-L938)
 * method[WP_HTML_Tag_Processor::base_class_next_token()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/base_class_next_token/)
 * Internal method which finds the next token in the HTML document.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/base_class_next_token/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/base_class_next_token/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:953](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L953-L1142)
 * method[WP_HTML_Tag_Processor::paused_at_incomplete_token()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/paused_at_incomplete_token/)
 * Whether the processor paused because the input HTML document ended in the middle
   of a syntax element, such as in the middle of a tag.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/paused_at_incomplete_token/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/paused_at_incomplete_token/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:1159](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L1159-L1161)
 * method[WP_HTML_Tag_Processor::skip_rawtext()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/skip_rawtext/)
 * Skips contents of generic rawtext elements.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/skip_rawtext/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/skip_rawtext/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:1391](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L1391-L1398)
 * method[WP_HTML_Tag_Processor::class_list()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/class_list/)
 * Generator for a foreach loop to step through each class name for the matched 
   tag.
 * Used by [2 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/class_list/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/class_list/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:1181](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L1181-L1229)
 * method[WP_HTML_Tag_Processor::has_class()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/has_class/)
 * Returns if a matched tag contains the given ASCII case-insensitive class name.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/has_class/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/has_class/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:1240](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L1240-L1258)
 * method[WP_HTML_Tag_Processor::has_self_closing_flag()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/has_self_closing_flag/)
 * Indicates if the currently matched tag contains the self-closing flag.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/has_self_closing_flag/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/has_self_closing_flag/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:3321](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L3321-L3335)
 * method[WP_HTML_Tag_Processor::has_bookmark()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/has_bookmark/)
 * Checks whether a bookmark with the given name exists.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/has_bookmark/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/has_bookmark/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:2606](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L2606-L2608)
 * method[WP_HTML_Tag_Processor::matches()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/matches/)
 * Checks whether a given tag and its attributes match the search criteria.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/matches/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/matches/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:4376](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L4376-L4397)
 * method[WP_HTML_Tag_Processor::parse_query()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/parse_query/)
 * Parses tag query input into internal search criteria.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/parse_query/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/parse_query/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:4319](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L4319-L4366)
 * method[WP_HTML_Tag_Processor::get_tag()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_tag/)
 * Returns the uppercase name of the matched tag.
 * Used by [6 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_tag/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/get_tag/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:2898](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L2898-L2917)
 * method[WP_HTML_Tag_Processor::is_tag_closer()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/is_tag_closer/)
 * Indicates if the current tag token is a tag closer.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/is_tag_closer/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/is_tag_closer/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:3354](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L3354-L3368)
 * method[WP_HTML_Tag_Processor::set_attribute()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/set_attribute/)
 * Updates or creates a new attribute on the currently matched tag with the passed
   value.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/set_attribute/#used-by)
   | Uses [7 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/set_attribute/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:4310](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L4310-L4451)
 * method[WP_HTML_Tag_Processor::remove_attribute()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/remove_attribute/)
 * Remove an attribute from the currently-matched tag.
 * Used by [2 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/remove_attribute/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/remove_attribute/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:4461](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L4461-L4529)
 * method[WP_HTML_Tag_Processor::add_class()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/add_class/)
 * Adds a new class name to the currently matched tag.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/add_class/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/add_class/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:4539](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L4539-L4571)
 * method[WP_HTML_Tag_Processor::remove_class()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/remove_class/)
 * Removes a class name from the currently matched tag.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/remove_class/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/remove_class/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:4581](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L4581-L4613)
 * method[WP_HTML_Tag_Processor::__toString()](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/__tostring/)
 * Returns the string representation of the HTML Tag Processor.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/__tostring/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_html_tag_processor/__tostring/#uses)
   | Source: [wp-includes/html-api/class-wp-html-tag-processor.php:4624](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/html-api/class-wp-html-tag-processor.php#L4624-L4626)

1 [2](https://developer.wordpress.org/reference/files/wp-includes/html-api/class-wp-html-tag-processor.php/page/2/?output_format=md)

 [Next Page](https://developer.wordpress.org/reference/files/wp-includes/html-api/class-wp-html-tag-processor.php/page/2/?output_format=md)