WPDev.one
Core Class

WP_Block_Parser

class WP_Block_Parser // Constructor: function Object() { [native code] }

Class WP_Block_Parser

Methods 7 methods

Method / Return Description
parse()
array[]

Parses a document and returns a list of block structures

Parameters: $document: mixed
proceed()
bool

Processes the next token from the input document

next_token()
array

Scans the document from where we last left off

freeform()
WP_Block_Parser_Block

Returns a new block object for freeform HTML

Parameters: $inner_html: mixed
add_freeform()
void

Pushes a length of text from the input document

Parameters: $length: mixed
add_inner_block()
void

Given a block structure from memory pushes

Parameters: $block: WP_Block_Parser_Block, $token_start: mixed, $token_length: mixed, $last_offset: mixed
add_block_from_stack()
void

Pushes the top block from the parsing stack to the output list.

Parameters: $end_offset: mixed

Properties

Property / Type Description
$document
mixed
public
No description available.
$offset
mixed
public
No description available.
$output
mixed
public
No description available.
$stack
mixed
public
No description available.

Class Information

Since Version
5.0.0
Source File
wp-includes/class-wp-block-parser.php
Advertisement