get_block_metadata_i18n_schema

The timeline below displays how wordpress function get_block_metadata_i18n_schema has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Gets i18n schema for block's metadata read from `block.json` file.
 *
 * @since 5.9.0
 *
 * @return object The schema for block's metadata.
 */
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;
}

WordPress Version: 5.9

/**
 * Gets i18n schema for block's metadata read from `block.json` file.
 *
 * @since 5.9.0
 *
 * @return array The schema for block's metadata.
 */
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;
}