Indicates if the currently matched tag contains the self-closing flag.
Description
No HTML elements ought to have the self-closing flag and for those, the self-closing flag will be ignored. For void elements this is benign because they "self close" automatically. For non-void HTML elements though problems will appear if someone intends to use a self-closing element in place of that element with an empty body.For HTML foreign elements and custom elements the self-closing flag determines if they self-close or not. This function does not determine if a tag is self-closing, but only if the self-closing flag is present in the syntax.
Return
bool
Whether the currently matched tag contains the self-closing flag.
Uses · 2
WP_HTML_Processor::is_virtual()Indicates if the currently-matched token is virtual, created by a stack operation while processing HTML, rather than a token found in the HTML text itself.
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 6.7.7 tag, from src/wp-includes/html-api/class-wp-html-processor.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.