Make WordPress Core

Changeset 40057


Ignore:
Timestamp:
02/12/2017 09:24:16 PM (8 years ago)
Author:
johnbillion
Message:

Themes: Add template type and template candidates as parameters to the {$type}_template filter.

Props mschadegg
Fixes #39525

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/template.php

    r40031 r40057  
    5454     *
    5555     * @since 1.5.0
    56      *
    57      * @param string $template Path to the template. See locate_template().
     56     * @since 4.8.0 The `$type` and `$templates` parameters were added.
     57     *
     58     * @param string $template  Path to the template. See locate_template().
     59     * @param string $type      Filename without extension.
     60     * @param array  $templates A list of template candidates, in descending order of priority.
    5861     */
    59     return apply_filters( "{$type}_template", $template );
     62    return apply_filters( "{$type}_template", $template, $type, $templates );
    6063}
    6164
Note: See TracChangeset for help on using the changeset viewer.