WP_Block_Parser_Block::__construct()
Constructor.
Will populate object properties from the provided arguments.
Метод класса: WP_Block_Parser_Block{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WP_Block_Parser_Block = new WP_Block_Parser_Block(); $WP_Block_Parser_Block->__construct( $name, $attrs, $inner_blocks, $inner_html, $inner_content );
- $name(строка) (обязательный)
- Name of block.
- $attrs(массив) (обязательный)
- Optional set of attributes from block comment delimiters.
- $inner_blocks(массив) (обязательный)
- List of inner blocks (of this same class).
- $inner_html(строка) (обязательный)
- Resultant HTML from inside block comment delimiters after removing inner blocks.
- $inner_content(массив) (обязательный)
- List of string fragments and null markers where inner blocks were found.
Список изменений
С версии 5.0.0 | Введена. |
Код WP_Block_Parser_Block::__construct() WP Block Parser Block:: construct WP 6.7.1
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 }