From ac8cba8791bed18787c4d82ea0233e6248d72d56 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Tue, 4 Oct 2022 04:29:08 +0000 Subject: [PATCH] Docs: Correct docblocks for `get_block_file_template()`. This corrects the docblock for `get_block_file_template()` and the filters it contains: `pre_get_block_file_template` and `get_block_file_template`. Prior to this change they were incorrectly documented with the docblocks for `get_block_template()` and its associated filters. Props felipeelia. Fixes #55929. Built from https://develop.svn.wordpress.org/trunk@54380 git-svn-id: http://core.svn.wordpress.org/trunk@53939 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/block-template-utils.php | 10 ++++++---- wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/wp-includes/block-template-utils.php b/wp-includes/block-template-utils.php index 78dac3724e..543cdaf629 100644 --- a/wp-includes/block-template-utils.php +++ b/wp-includes/block-template-utils.php @@ -1059,7 +1059,9 @@ function get_block_template( $id, $template_type = 'wp_template' ) { } /** - * Retrieves a single unified template object using its id. + * Retrieves a unified template object based on a theme file. + * + * This is a fallback of get_block_template(), used when no templates are found in the database. * * @since 5.9.0 * @@ -1070,9 +1072,9 @@ function get_block_template( $id, $template_type = 'wp_template' ) { */ function get_block_file_template( $id, $template_type = 'wp_template' ) { /** - * Filters the block templates array before the query takes place. + * Filters the block template object before the theme file discovery takes place. * - * Return a non-null value to bypass the WordPress queries. + * Return a non-null value to bypass the WordPress theme file discovery. * * @since 5.9.0 * @@ -1107,7 +1109,7 @@ function get_block_file_template( $id, $template_type = 'wp_template' ) { $block_template = _build_block_template_result_from_file( $template_file, $template_type ); /** - * Filters the array of queried block templates array after they've been fetched. + * Filters the block template object after it has been (potentially) fetched from the theme file. * * @since 5.9.0 * diff --git a/wp-includes/version.php b/wp-includes/version.php index 8c33bffb0a..81f605c0a3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-beta2-54379'; +$wp_version = '6.1-beta2-54380'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.