Indicates if the currently matched tag contains the self-closing flag.
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.
$this->insert_html_element( $this->state->current_token );
return true;
}
| Version | Description |
|---|---|
| 6.6.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_html_processor/has_self_closing_flag