wordpress / latest / classes / wp_block_list / offsetset.html

WP_Block_List::offsetSet( $index, $value )

Source

File: wp-includes/class-wp-block-list.php. View all references

public function offsetSet( $index, $value ) {
	if ( is_null( $index ) ) {
		$this->blocks[] = $value;
	} else {
		$this->blocks[ $index ] = $value;
	}
}

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_block_list/offsetset