Constructor.
Description
Will populate object properties from the provided arguments.
Parameters
$namestringrequired- Name of block.
$attrsarrayoptional- Optional set of attributes from block comment delimiters.
$inner_blocksarrayoptional- List of inner blocks (of this same class).
$inner_htmlstringoptional- Resultant HTML from inside block comment delimiters after removing inner blocks.
$inner_contentarrayoptional- 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.