GC_Block_List::offsetGet()
最后更新于:2021-11-26 09:56:08
GC_Block_List::offsetGet( string$index)响应s the value by the specified block index.
参数
- $index
-
(string) (Required) Index of block value to retrieve.
响应
(mixed|null) Block value if exists, or null.
源文件
文件: gc-includes/class-gc-block-list.php
public function offsetGet( $index ) {
$block = $this->blocks[ $index ];
if ( isset( $block ) && is_array( $block ) ) {
$block = new GC_Block( $block, $this->available_context, $this->registry );
$this->blocks[ $index ] = $block;
}
return $block;
}