WP_Block_List::offsetExists │ public │ WP 5.5.0 │ ReturnTypeWillChange

Returns true if a block exists by the specified block offset, or false otherwise.

Метод класса: WP_Block_List{}

Хуков нет.

Возвращает

bool. Whether block exists.

Использование

$WP_Block_List = new WP_Block_List();
$WP_Block_List->offsetExists( $offset );
$offset(int) (обязательный)
Offset of block to check for.

Список изменений

С версии 5.5.0 Введена.

Код WP_Block_List::offsetExists() WP 7.1.4

public function offsetExists( $offset ) {
	return isset( $this->blocks[ $offset ] );
}