WP_Block_List::offsetSet

Advertisement

Summery Summery

Assign a block value by the specified block index.

Syntax Syntax

WP_Block_List::offsetSet( string $index, mixed $value )

Parameters Parameters

$index

(Required) Index of block value to set.

$value

(Required) Block value.

Source 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;
		}
	}

Advertisement

Changelog Changelog

Changelog
Version Description
5.5.0 Introduced.

Advertisement

Leave a Reply