WP_Block_Type_Registry::is_registered()publicWP 5.0.0

Checks if a block type is registered.

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

Хуков нет.

Возвращает

true|false. True if the block type is registered, false otherwise.

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

$WP_Block_Type_Registry = new WP_Block_Type_Registry();
$WP_Block_Type_Registry->is_registered( $name );
$name(строка) (обязательный)
Block type name including namespace.

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

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

Код WP_Block_Type_Registry::is_registered() WP 6.5.2

public function is_registered( $name ) {
	return isset( $this->registered_block_types[ $name ] );
}