default_template_types
Filter HookDescription
Filters the list of default template types. Data for the template type. } }Hook Information
File Location |
wp-includes/block-template-utils.php
View on GitHub
|
Hook Type | Filter |
Line Number | 242 |
Hook Parameters
Type | Name | Description |
---|---|---|
array[]
|
$default_template_types
|
{ The default template types. |
Usage Examples
Basic Usage
<?php
// Hook into default_template_types
add_filter('default_template_types', 'my_custom_filter', 10, 1);
function my_custom_filter($default_template_types) {
// Your custom filtering logic here
return $default_template_types;
}
Source Code Context
wp-includes/block-template-utils.php:242
- How this hook is used in WordPress core
<?php
237 * @type string $title Template type title.
238 * @type string $description Template type description.
239 * }
240 * }
241 */
242 return apply_filters( 'default_template_types', $default_template_types );
243 }
244
245 /**
246 * Checks whether the input 'area' is a supported value.
247 * Returns the input if supported, otherwise returns the 'uncategorized' value.
PHP Documentation
<?php
/**
* Filters the list of default template types.
*
* @since 5.9.0
*
* @param array[] $default_template_types {
* The default template types.
*
* @type array ...$0 {
* Data for the template type.
*
* @type string $title Template type title.
* @type string $description Template type description.
* }
* }
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/block-template-utils.php
Related Hooks
Related hooks will be displayed here in future updates.