GC_Block_List::offsetSet()

最后更新于:2021-11-26 09:59:25

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

Assign a block value by the specified block index.

参数

$index

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

$value

(mixed) (Required) Block value.

源文件

文件: gc-includes/class-gc-block-list.php

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