You appear to be a bot. Output may be restricted
Description
Parses a document and returns a list of block structures
When encountering an invalid parse will return a best-effort parse. In contrast to the specification parser this does not return an error on invalid inputs.
Usage
$WP_Block_Parser_Block[] = WP_Block_Parser::parse( $document );
Parameters
- $document
- ( string ) required – Input document being parsed.
Returns
WP_Block_Parser_Block[]
Source
File name: wordpress/wp-includes/class-wp-block-parser.php
Lines: 1 to 14 of 14
function parse( $document ) { $this->document = $document; $this->offset = 0; $this->output = array(); $this->stack = array(); $this->empty_attrs = json_decode( '{}', true ); do { // twiddle our thumbs. } while ( $this->proceed() ); return $this->output; }