get_block_metadata_i18n_schema()WP 5.9.0

Gets i18n schema for block's metadata read from block.json file.

No Hooks.

Return

Object. The schema for block's metadata.

Usage

get_block_metadata_i18n_schema();

Changelog

Since 5.9.0 Introduced.

Code of get_block_metadata_i18n_schema() WP 6.0

function get_block_metadata_i18n_schema() {
	static $i18n_block_schema;

	if ( ! isset( $i18n_block_schema ) ) {
		$i18n_block_schema = wp_json_file_decode( __DIR__ . '/block-i18n.json' );
	}

	return $i18n_block_schema;
}