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

(string) (Required) Index of block value to set.

$value

(mixed) (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

This site uses Akismet to reduce spam. Learn how your comment data is processed.