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
This commit is contained in:
Peter Wilson 2022-10-04 04:29:08 +00:00
parent d7e3d069a1
commit ac8cba8791
2 changed files with 7 additions and 5 deletions

View File

@ -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
*

View File

@ -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.