wp_register_block_metadata_collection( string $path, string $manifest )

In this article

Registers a block metadata collection.

Description

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.

Parameters

$pathstringrequired
The base path in which block files for the collection reside.
$manifeststringrequired
The path to the manifest file for the collection.

Source

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

Changelog

VersionDescription
6.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.