Skip to content

Commit

Permalink
Docs: Correct @return value for _get_block_templates_files().
Browse files Browse the repository at this point in the history
The function returns `null` if `$template_type` is not `wp_template` or `wp_template_part`.

Follow-up to [52062].

Props dilipbheda, mukesh27.
Fixes #61705.

git-svn-id: https://develop.svn.wordpress.org/trunk@58768 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Jul 19, 2024
1 parent f9d02a2 commit e407bb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-includes/block-template-utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ function _get_block_template_file( $template_type, $slug ) {
* @type string $post_type Post type to get the templates for.
* }
*
* @return array Template
* @return array|null Template files on success, null if `$template_type` is not matched.
*/
function _get_block_templates_files( $template_type, $query = array() ) {
if ( 'wp_template' !== $template_type && 'wp_template_part' !== $template_type ) {
Expand Down

0 comments on commit e407bb0

Please sign in to comment.