WordPress Hooks Explorer

Listing all hooks extracted WordPress Core


Details about theme_templates

Back to home

Files

Filename Hook Type Line Number PHP Doc
wp-includes/class-wp-theme.php apply_filters 1327 /**
* Filters list of page templates for a theme.
*
* @since 4.9.6
*
* @param string[] $post_templates Array of template header names keyed by the template file name.
* @param WP_Theme $theme The theme object.
* @param WP_Post|null $post The post being edited, provided for context, or null.
* @param string $post_type Post type to get the templates for.
*/

Hook Parameters

Parameter Type Name Description
string[] $post_templates Array of template header names keyed by the template file name.
WP_Theme $theme The theme object.
WP_Post|null $post The post being edited, provided for context, or null.
string $post_type Post type to get the templates for.