mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 09:07:59 +01:00
Themes: Standardize on passing frontpage
and privacypolicy
as the $type
parameter to get_query_template()
.
These keys are used in `{$type}_template_hierarchy` and `{$type}_template` filters. Previously, `front_page` and `privacy_policy` were passed, but `get_query_template()` stripped the underscores before passing the values to the filters. Props rinatkhaziev, tmatsuur, johnbillion. Fixes #21213, #46958. Built from https://develop.svn.wordpress.org/trunk@45231 git-svn-id: http://core.svn.wordpress.org/trunk@45040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
604769cca5
commit
e1de58320d
@ -57,7 +57,7 @@ function get_query_template( $type, $templates = array() ) {
|
||||
* @since 4.8.0 The `$type` and `$templates` parameters were added.
|
||||
*
|
||||
* @param string $template Path to the template. See locate_template().
|
||||
* @param string $type Filename without extension.
|
||||
* @param string $type Sanitized filename without extension.
|
||||
* @param array $templates A list of template candidates, in descending order of priority.
|
||||
*/
|
||||
return apply_filters( "{$type}_template", $template, $type, $templates );
|
||||
@ -373,7 +373,7 @@ function get_home_template() {
|
||||
function get_front_page_template() {
|
||||
$templates = array( 'front-page.php' );
|
||||
|
||||
return get_query_template( 'front_page', $templates );
|
||||
return get_query_template( 'frontpage', $templates );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -391,7 +391,7 @@ function get_front_page_template() {
|
||||
function get_privacy_policy_template() {
|
||||
$templates = array( 'privacy-policy.php' );
|
||||
|
||||
return get_query_template( 'privacy_policy', $templates );
|
||||
return get_query_template( 'privacypolicy', $templates );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.2-beta3-45230';
|
||||
$wp_version = '5.2-beta3-45231';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user