WordPress at a glance
filter is not described

theme_templates filter-hook . WP 4.9.6

Filters list of page templates for a theme.


add_filter( 'theme_templates', 'filter_function_name_1463', 10, 4 );
function filter_function_name_1463( $post_templates, $this, $post, $post_type ){
	// filter...

	return $post_templates;
Array of template header names keyed by the template file name.
The theme object.
The post being edited, provided for context, or null.
Post type to get the templates for.


Since 4.9.6 Introduced.

Where the hook is called

wp-includes/class-wp-theme.php 1265
$post_templates = (array) apply_filters( 'theme_templates', $post_templates, $this, $post, $post_type );

Where in WP core the hook is used WordPress

Usage not found.