- Timestamp:
- 08/23/2024 02:53:59 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/html-api/class-wp-html-tag-processor.php
r58897 r58925 4028 4028 4029 4029 /** 4030 * Gets DOCTYPE declaration info from a DOCTYPE token. 4031 * 4032 * DOCTYPE tokens may appear in many places in an HTML document. In most places, they are 4033 * simply ignored. The main parsing functions find the basic shape of DOCTYPE tokens but 4034 * do not perform detailed parsing. 4035 * 4036 * This method can be called to perform a full parse of the DOCTYPE token and retrieve 4037 * its information. 4038 * 4039 * @return WP_HTML_Doctype_Info|null The DOCTYPE declaration information or `null` if not 4040 * currently at a DOCTYPE node. 4041 */ 4042 public function get_doctype_info(): ?WP_HTML_Doctype_Info { 4043 if ( self::STATE_DOCTYPE !== $this->parser_state ) { 4044 return null; 4045 } 4046 4047 return WP_HTML_Doctype_Info::from_doctype_token( substr( $this->html, $this->token_starts_at, $this->token_length ) ); 4048 } 4049 4050 /** 4030 4051 * Parser Ready State. 4031 4052 * … … 4118 4139 /** 4119 4140 * Indicates that the parser has found a DOCTYPE node and it's 4120 * possible to read and modify its modifiable text.4141 * possible to read its DOCTYPE information via `get_doctype_info()`. 4121 4142 * 4122 4143 * @since 6.5.0
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)