Uses
Uses | Description |
---|---|
wp-includes/class-wp-block.php: WP_Block::__construct() | Constructor. |
Returns the value by the specified block index.
(string) (Required) Index of block value to retrieve.
(mixed|null) Block value if exists, or null.
File: wp-includes/class-wp-block-list.php
public function offsetGet( $index ) { $block = $this->blocks[ $index ]; if ( isset( $block ) && is_array( $block ) ) { $block = new WP_Block( $block, $this->available_context, $this->registry ); $this->blocks[ $index ] = $block; } return $block; }
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/offsetget