mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Themes: Add template type and template candidates as parameters to the {$type}_template
filter.
Props mschadegg Fixes #39525 Built from https://develop.svn.wordpress.org/trunk@40057 git-svn-id: http://core.svn.wordpress.org/trunk@39994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bccb15166a
commit
1100cca947
@ -53,10 +53,13 @@ function get_query_template( $type, $templates = array() ) {
|
||||
* 'embed', home', 'frontpage', 'page', 'paged', 'search', 'single', 'singular', and 'attachment'.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @since 4.8.0 The `$type` and `$templates` parameters were added.
|
||||
*
|
||||
* @param string $template Path to the template. See locate_template().
|
||||
* @param string $template Path to the template. See locate_template().
|
||||
* @param string $type Filename without extension.
|
||||
* @param array $templates A list of template candidates, in descending order of priority.
|
||||
*/
|
||||
return apply_filters( "{$type}_template", $template );
|
||||
return apply_filters( "{$type}_template", $template, $type, $templates );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.8-alpha-40056';
|
||||
$wp_version = '4.8-alpha-40057';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user