On this page
apply_filters( 'theme_templates', string[] $post_templates, WP_Theme $theme, WP_Post|null $post, string $post_type )
Filters list of page templates for a theme.
Parameters
Source
File: wp-includes/class-wp-theme.php. View all references
$post_templates = (array) apply_filters( 'theme_templates', $post_templates, $this, $post, $post_type );
Related
Used By
| Used By | Description |
|---|---|
| WP_Theme::get_page_templates() wp-includes/class-wp-theme.php | Returns the theme’s post templates for a given post type. |
Changelog
| Version | Description |
|---|---|
| 4.9.6 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/theme_templates