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.



git-svn-id: https://develop.svn.wordpress.org/trunk@54380 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Wilson 2022-10-04 04:27:33 +00:00
parent 09fd082625
commit 2b2f1fd885

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
*