Constructor
Description
Will populate object properties from the provided arguments.
Parameters
$block
WP_Block_Parser_Blockrequired- Full or partial block.
$token_start
intrequired- Byte offset into document for start of parse token.
$token_length
intrequired- Byte length of entire parse token string.
$prev_offset
intoptional- Byte offset into document for after parse token ends.
Default:
null
$leading_html_start
intoptional- Byte offset into document where leading HTML before token starts.
Default:
null
Source
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;
}
Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.