WordPress at a glance
function is not described

WP_Block_Parser_Frame::__construct() public WP 5.0.0


Will populate object properties from the provided arguments.

{} It's a method of the class: WP_Block_Parser_Frame{}

No Hooks.


null. Nothing.


$WP_Block_Parser_Frame = new WP_Block_Parser_Frame();
$WP_Block_Parser_Frame->__construct( $block, $token_start, $token_length, $prev_offset, $leading_html_start );
$block(WP_Block_Parser_Block) (required)
Full or partial block.
$token_start(int) (required)
Byte offset into document for start of parse token.
$token_length(int) (required)
Byte length of entire parse token string.
Byte offset into document for after parse token ends.
Byte offset into document where leading HTML before token starts.


Since 5.0.0 Introduced.

Code of WP_Block_Parser_Frame::__construct() WP 5.7.2

function __construct( $block, $token_start, $token_length, $prev_offset = null, $leading_html_start = null ) {
	$this->block              = $block;
	$this->token_start        = $token_start;
	$this->token_length       = $token_length;
	$this->prev_offset        = isset( $prev_offset ) ? $prev_offset : $token_start + $token_length;
	$this->leading_html_start = $leading_html_start;