WP_Block_List::offsetSet( string $index, mixed $value )
Assign a block value by the specified block index.
Parameters
- $index
-
(string) (Required) Index of block value to set.
- $value
-
(mixed) (Required) Block value.
Source
File: wp-includes/class-wp-block-list.php
public function offsetSet( $index, $value ) { if ( is_null( $index ) ) { $this->blocks[] = $value; } else { $this->blocks[ $index ] = $value; } }
Changelog
Version | Description |
---|---|
5.5.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_block_list/offsetset