From 6857e6954976dc76f39810cb1436cb408b761678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Zi=C3=83=C2=B3=C3=85=E2=80=9Akowski?= Date: Thu, 4 Nov 2021 16:02:42 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@52012 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/blocks.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php index 72330aa578..97c292d875 100644 --- a/src/wp-includes/blocks.php +++ b/src/wp-includes/blocks.php @@ -213,6 +213,7 @@ function get_block_metadata_i18n_schema() { * * @param string $file_or_folder Path to the JSON file with metadata definition for * the block or path to the folder where the `block.json` file is located. + * If providing the path to a JSON file, the filename must end with `block.json`. * @param array $args Optional. Array of block type arguments. Accepts any public property * of `WP_Block_Type`. See WP_Block_Type::__construct() for information * on accepted arguments. Default empty array.