theme_templates

Advertisement

Summery Summery

Filters list of page templates for a theme.

Syntax Syntax

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

Parameters Parameters

$post_templates

(string[]) Array of template header names keyed by the template file name.

$this

(WP_Theme) The theme object.

$post

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

$post_type

(string) Post type to get the templates for.

Source Source

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

Advertisement

Changelog Changelog

Changelog
Version Description
4.9.6 Introduced.

Advertisement

Leave a Reply