| 14 | | * Registers a block type from metadata stored in the `block.json` file. |
| 15 | | * |
| 16 | | * @since 5.5.0 |
| 17 | | * |
| 18 | | * @param string $file_or_folder Path to the JSON file with metadata definition for |
| 19 | | * the block or path to the folder where the `block.json` file is located. |
| 20 | | * @param array $args { |
| 21 | | * Optional. Array of block type arguments. Any arguments may be defined, however the |
| 22 | | * ones described below are supported by default. Default empty array. |
| 23 | | * |
| 24 | | * @type callable $render_callback Callback used to render blocks of this block type. |
| 25 | | * } |
| 26 | | * @return WP_Block_Type|false The registered block type on success, or false on failure. |
| 27 | | */ |
| 28 | | function register_block_type_from_metadata( $file_or_folder, $args = array() ) |
| | 14 | * Registers a block type from metadata stored in the `block.json` file. |
| | 15 | * |
| | 16 | * @since 5.5.0 |
| | 17 | * |
| | 18 | * @param string $file_or_folder Path to the JSON file with metadata definition for |
| | 19 | * the block or path to the folder where the `block.json` file is located. |
| | 20 | * @param array $args { |
| | 21 | * Optional. Array of block type arguments. Any arguments may be defined, however the |
| | 22 | * ones described below are supported by default. Default empty array. |
| | 23 | * |
| | 24 | * @type callable $render_callback Callback used to render blocks of this block type. |
| | 25 | * } |
| | 26 | * @return WP_Block_Type|false The registered block type on success, or false on failure. |
| | 27 | */ |
| | 28 | function register_block_type_from_metadata( $file_or_folder, $args = array() ); |