Constructor.
Description
Will populate object properties from the provided arguments.
Parameters
$name
stringrequired- Name of block.
$attrs
arrayoptional- Optional set of attributes from block comment delimiters.
$inner_blocks
arrayoptional- List of inner blocks (of this same class).
$inner_html
stringoptional- Resultant HTML from inside block comment delimiters after removing inner blocks.
$inner_content
arrayoptional- List of string fragments and null markers where inner blocks were found.
Source
public function __construct( $name, $attrs, $inner_blocks, $inner_html, $inner_content ) {
$this->blockName = $name; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
$this->attrs = $attrs;
$this->innerBlocks = $inner_blocks; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
$this->innerHTML = $inner_html; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
$this->innerContent = $inner_content; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
}
Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.