Un motore di ricerca WordPress per sviluppatori e autori di temi



theme_{$post_type}_templates ›

Da4.7.0
Deprecaton/a
apply_filters( "theme_{$post_type}_templates", $post_templates, $this, $post, $post_type )
Parametri: (4)
  • (string[]) $post_templates Array of page templates. Keys are filenames, values are translated names.
    Richiesto:
  • (WP_Theme) $this The theme object.
    Richiesto:
  • (WP_Post|null) $post The post being edited, provided for context, or null.
    Richiesto:
  • (string) $post_type Post type to get the templates for.
    Richiesto:
Definito a:
Codex:

Filters list of page templates for a theme.

The dynamic portion of the hook name, $post_type, refers to the post type.





Sorgenti

$post_templates = (array) apply_filters( "theme_{$post_type}_templates", $post_templates, $this, $post, $post_type );