Automattic\WooCommerce\Blocks\BlockTypes
AbstractBlock::parse_render_callback_attributes()
Parses block attributes from the render_callback.
Method of the class: AbstractBlock{}
No Hooks.
Return
Array
.
Usage
// protected - for code of main (parent) or child class $result = $this->parse_render_callback_attributes( $attributes );
- $attributes(array|WP_Block) (required)
- Block attributes, or an instance of a WP_Block.
Default: an empty array
AbstractBlock::parse_render_callback_attributes() AbstractBlock::parse render callback attributes code WC 9.4.2
protected function parse_render_callback_attributes( $attributes ) { return is_a( $attributes, 'WP_Block' ) ? $attributes->attributes : $attributes; }