Themes: Use curly braces for variables inside strings in `get_page_template() to explicitly specify the end of the variable name.

Props kuck1u.
Fixes #38625.

git-svn-id: https://develop.svn.wordpress.org/trunk@39884 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2017-01-12 04:12:22 +00:00
parent 9d9ab96249
commit 6afc94def0

View File

@@ -418,10 +418,10 @@ function get_page_template() {
if ( $pagename_decoded !== $pagename ) {
$templates[] = "page-{$pagename_decoded}.php";
}
$templates[] = "page-$pagename.php";
$templates[] = "page-{$pagename}.php";
}
if ( $id )
$templates[] = "page-$id.php";
$templates[] = "page-{$id}.php";
$templates[] = 'page.php';
return get_query_template( 'page', $templates );