Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



theme_templates ›

Seit4.9.6
Veraltetn/v
apply_filters( 'theme_templates', $post_templates, $this, $post, $post_type )
Parameter: (4)
  • (string[]) $post_templates Array of page templates. Keys are filenames, values are translated names.
    Erforderlich: Ja
  • (WP_Theme) $this The theme object.
    Erforderlich: Ja
  • (WP_Post|null) $post The post being edited, provided for context, or null.
    Erforderlich: Ja
  • (string) $post_type Post type to get the templates for.
    Erforderlich: Ja
Definiert in:
Codex:

Filters list of page templates for a theme.





Quellcode

$post_templates = (array) apply_filters( 'theme_templates', $post_templates, $this, $post, $post_type );