Filter hook 'theme_templates'

in WP Core File wp-includes/class-wp-theme.php at line 1410

Description

Filters list of page templates for a theme.

Occurrences

Filename Line Number
wp-includes/class-wp-theme.php 1410

Parameters

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.

PHP Doc

/**
		 * 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.
		 */