WordPress at a glance
function is not described

WP_Block_Parser_Frame::__construct() public WP 3.8.0

Constructor

Will populate object properties from the provided arguments.

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

No Hooks.

Return

Null. Nothing.

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 3.8.0 Introduced.

Code of WP_Block_Parser_Frame::__construct() WP 5.5.1

<?php
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;
}