WP_Block_Parser_Frame::__construct()publicWP 5.0.0

Constructor

Will populate object properties from the provided arguments.

Method of the class: WP_Block_Parser_Frame{}

No Hooks.

Return

null. Nothing (null).

Usage

$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.
$prev_offset(int)
Byte offset into document for after parse token ends.
Default: null
$leading_html_start(int)
Byte offset into document where leading HTML before token starts.
Default: null

Changelog

Since 5.0.0 Introduced.

WP_Block_Parser_Frame::__construct() code WP 6.4.3

public 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;
}