Uses
Uses | Description |
---|---|
wp-includes/class-wp-block-type-registry.php: WP_Block_Type_Registry::get_instance() | Utility method to retrieve the main instance of the class. |
Constructor.
Populates object properties from the provided block instance argument.
(array[]|WP_Block[]) (Required) Array of parsed block data, or block instances.
(array) (Optional) array of ancestry context values.
Default value: array()
(WP_Block_Type_Registry) (Optional) block type registry.
Default value: null
File: wp-includes/class-wp-block-list.php
public function __construct( $blocks, $available_context = array(), $registry = null ) { if ( ! $registry instanceof WP_Block_Type_Registry ) { $registry = WP_Block_Type_Registry::get_instance(); } $this->blocks = $blocks; $this->available_context = $available_context; $this->registry = $registry; }
Version | Description |
---|---|
5.5.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_block_list/__construct