Summery Summery
Returns the value by the specified block index.
Syntax Syntax
Parameters Parameters
- $index
-
(Required) Index of block value to retrieve.
Return Return
(mixed|null) Block value if exists, or null.
Source Source
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; }
Advertisement
Changelog Changelog
Version | Description |
---|---|
5.5.0 | Introduced. |