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
- $post_templates
-
Array of template header names keyed by the template file name.
- $theme
-
The theme object.
- $post
-
The post being edited, provided for context, or null.
- $post_type
-
Post type to get the templates for.
Source
Changelog
Version | Description |
---|---|
4.9.6 | Introduced. |