apply_filters( 'theme_templates', string[] $post_templates, WP_Theme $this, WP_Post|null $post, string $post_type )

Filters list of page templates for a theme.

Description Description

Parameters Parameters


(string[]) Array of page templates. Keys are filenames, values are translated names.


(WP_Theme) The theme object.


(WP_Post|null) The post being edited, provided for context, or null.


(string) Post type to get the templates for.

Top ↑

Source Source

File: wp-includes/class-wp-theme.php

View on Trac

Top ↑

Changelog Changelog

Version Description
4.9.6 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.