WP_Block_Parser_Frame::__construct

Advertisement

Summery Summery

Constructor

Syntax Syntax

WP_Block_Parser_Frame::__construct( WP_Block_Parser_Block $block, int $token_start, int $token_length, int $prev_offset = null, int $leading_html_start = null )

Description Description

Will populate object properties from the provided arguments.

Parameters Parameters

$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) (Optional) Byte offset into document for after parse token ends.

Default value: null

$leading_html_start

(int) (Optional) Byte offset into document where leading HTML before token starts.

Default value: null

Source Source

File: wp-includes/class-wp-block-parser.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;
	}

Advertisement

Changelog Changelog

Changelog
Version Description
3.8.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.