Make WordPress Core

Changeset 52012


Ignore:
Timestamp:
11/04/2021 04:02:42 PM (2 years ago)
Author:
gziolo
Message:

Docs: Clarify the path usage register_block_type_from_metadata

The filename passed with the first param must end with block.json.

Fixes #53806.
Props coreyw, costdev.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks.php

    r51895 r52012  
    214214 * @param string $file_or_folder Path to the JSON file with metadata definition for
    215215 *                               the block or path to the folder where the `block.json` file is located.
     216 *                               If providing the path to a JSON file, the filename must end with `block.json`.
    216217 * @param array  $args           Optional. Array of block type arguments. Accepts any public property
    217218 *                               of `WP_Block_Type`. See WP_Block_Type::__construct() for information
Note: See TracChangeset for help on using the changeset viewer.