WP_Block_Parser_Block::__construct

Advertisement

Summery Summery

Constructor.

Syntax Syntax

WP_Block_Parser_Block::__construct( string $name, array $attrs, array $innerBlocks, string $innerHTML, array $innerContent )

Description Description

Will populate object properties from the provided arguments.

Parameters Parameters

$name

(string) (Required) Name of block.

$attrs

(array) (Optional) set of attributes from block comment delimiters.

$innerBlocks

(array) (Optional) List of inner blocks (of this same class).

$innerHTML

(string) (Optional) Resultant HTML from inside block comment delimiters after removing inner blocks.

$innerContent

(array) (Optional) List of string fragments and null markers where inner blocks were found.

Source Source

File: wp-includes/class-wp-block-parser.php

	function __construct( $name, $attrs, $innerBlocks, $innerHTML, $innerContent ) {
		$this->blockName    = $name;
		$this->attrs        = $attrs;
		$this->innerBlocks  = $innerBlocks;
		$this->innerHTML    = $innerHTML;
		$this->innerContent = $innerContent;
	}

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.

What are you looking for?