Automattic\WooCommerce\Blocks\BlockTypes
ProductsByAttribute::get_block_type_attributes()
Get block attributes.
Метод класса: ProductsByAttribute{}
Хуков нет.
Возвращает
Массив
.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_block_type_attributes();
Код ProductsByAttribute::get_block_type_attributes() ProductsByAttribute::get block type attributes WC 8.7.0
protected function get_block_type_attributes() { return array( 'align' => $this->get_schema_align(), 'alignButtons' => $this->get_schema_boolean( false ), 'attributes' => array( 'type' => 'array', 'items' => array( 'type' => 'object', 'properties' => array( 'id' => array( 'type' => 'number', ), 'attr_slug' => array( 'type' => 'string', ), ), ), 'default' => array(), ), 'attrOperator' => array( 'type' => 'string', 'default' => 'any', ), 'className' => $this->get_schema_string(), 'columns' => $this->get_schema_number( wc_get_theme_support( 'product_blocks::default_columns', 3 ) ), 'contentVisibility' => $this->get_schema_content_visibility(), 'orderby' => $this->get_schema_orderby(), 'rows' => $this->get_schema_number( wc_get_theme_support( 'product_blocks::default_rows', 3 ) ), 'isPreview' => $this->get_schema_boolean( false ), 'stockStatus' => array( 'type' => 'array', 'default' => array_keys( wc_get_product_stock_status_options() ), ), ); }