Automattic\WooCommerce\Admin\Features\ProductBlockEditor
BlockRegistry::augment_attributes()
Augment the attributes of a block by adding attributes that are used by the product editor.
Метод класса: BlockRegistry{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->augment_attributes( $attributes );
- $attributes(массив) (обязательный)
- Block attributes.
Код BlockRegistry::augment_attributes() BlockRegistry::augment attributes WC 9.7.1
private function augment_attributes( $attributes ) { // Note: If you modify this function, also update the client-side // registerWooBlockType function in @woocommerce/block-templates. return array_merge( $attributes, array( '_templateBlockId' => array( 'type' => 'string', '__experimentalRole' => 'content', ), '_templateBlockOrder' => array( 'type' => 'integer', '__experimentalRole' => 'content', ), '_templateBlockHideConditions' => array( 'type' => 'array', '__experimentalRole' => 'content', ), '_templateBlockDisableConditions' => array( 'type' => 'array', '__experimentalRole' => 'content', ), 'disabled' => isset( $attributes['disabled'] ) ? $attributes['disabled'] : array( 'type' => 'boolean', '__experimentalRole' => 'content', ), ) ); }