Make WordPress Core

Changeset 54380


Ignore:
Timestamp:
10/04/2022 04:27:33 AM (2 years ago)
Author:
peterwilsoncc
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-template-utils.php

    r54370 r54380  
    10601060
    10611061/**
    1062  * Retrieves a single unified template object using its id.
     1062 * Retrieves a unified template object based on a theme file.
     1063 *
     1064 * This is a fallback of get_block_template(), used when no templates are found in the database.
    10631065 *
    10641066 * @since 5.9.0
     
    10711073function get_block_file_template( $id, $template_type = 'wp_template' ) {
    10721074    /**
    1073      * Filters the block templates array before the query takes place.
    1074      *
    1075      * Return a non-null value to bypass the WordPress queries.
     1075     * Filters the block template object before the theme file discovery takes place.
     1076     *
     1077     * Return a non-null value to bypass the WordPress theme file discovery.
    10761078     *
    10771079     * @since 5.9.0
     
    11081110
    11091111    /**
    1110      * Filters the array of queried block templates array after they've been fetched.
     1112     * Filters the block template object after it has been (potentially) fetched from the theme file.
    11111113     *
    11121114     * @since 5.9.0
Note: See TracChangeset for help on using the changeset viewer.