Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: {$type}_template

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
54       * 'embed', 'home', 'frontpage', 'privacypolicy', 'page', 'paged', 'search', 'single', 'singular', and 'attachment'.
55       *
56       * @since 1.5.0
57       * @since 4.8.0 The `$type` and `$templates` parameters were added.
58       *
59       * @param string $template  Path to the template. See locate_template().
60       * @param string $type      Sanitized filename without extension.
61       * @param array  $templates A list of template candidates, in descending order of priority.
62       */
63      return apply_filters( "{$type}_template", $template, $type, $templates );
64 }
65
66 /**
67  * Retrieve path of index template in current or parent template.
68  *
69  * The template hierarchy and template path are filterable via the {@see '$type_template_hierarchy'}
70  * and {@see '$type_template'} dynamic hooks, where `$type` is 'index'.
71  *
72  * @since 3.0.0