- Timestamp:
- 04/04/2023 10:04:45 AM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/html-api/class-wp-html-tag-processor.php
r55555 r55619 1758 1758 1759 1759 return strtoupper( $tag_name ); 1760 } 1761 1762 /** 1763 * Indicates if the currently matched tag contains the self-closing flag. 1764 * 1765 * No HTML elements ought to have the self-closing flag and for those, the self-closing 1766 * flag will be ignored. For void elements this is benign because they "self close" 1767 * automatically. For non-void HTML elements though problems will appear if someone 1768 * intends to use a self-closing element in place of that element with an empty body. 1769 * For HTML foreign elements and custom elements the self-closing flag determines if 1770 * they self-close or not. 1771 * 1772 * This function does not determine if a tag is self-closing, 1773 * but only if the self-closing flag is present in the syntax. 1774 * 1775 * @since 6.3.0 1776 * 1777 * @return bool Whether the currently matched tag contains the self-closing flag. 1778 */ 1779 public function has_self_closing_flag() { 1780 if ( ! $this->tag_name_starts_at ) { 1781 return false; 1782 } 1783 1784 return '/' === $this->html[ $this->tag_ends_at - 1 ]; 1760 1785 } 1761 1786
Note: See TracChangeset
for help on using the changeset viewer.