wp_register_block_metadata_collection()WP 6.7.0

Registers a block metadata collection.

This function allows core and third-party plugins to register their block metadata collections in a centralized location. Registering collections can improve performance by avoiding multiple reads from the filesystem and parsing JSON.

Хуков нет.

Возвращает

null. Ничего (null).

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

wp_register_block_metadata_collection( $path, $manifest );
$path(строка) (обязательный)
The base path in which block files for the collection reside.
$manifest(строка) (обязательный)
The path to the manifest file for the collection.

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

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

Код wp_register_block_metadata_collection() WP 6.7.1

function wp_register_block_metadata_collection( $path, $manifest ) {
	WP_Block_Metadata_Registry::register_collection( $path, $manifest );
}