On this page
apply_filters( 'get_block_templates', WP_Block_Template[] $query_result, array $query, string $template_type )
Filters the array of queried block templates array after they’ve been fetched.
Parameters
$query_resultWP_Block_Template[]-
Array of found block templates.
$queryarray-
Arguments to retrieve templates.
slug__inarrayList of slugs to include.wp_idintPost ID of customized template.
$template_typestring-
wp_template or wp_template_part.
Source
File: wp-includes/block-template-utils.php. View all references
return apply_filters( 'get_block_templates', $query_result, $query, $template_type );
Related
Used By
| Used By | Description |
|---|---|
| get_block_templates() wp-includes/block-template-utils.php | Retrieves a list of unified template objects based on a query. |
Changelog
| Version | Description |
|---|---|
| 5.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/get_block_templates