From 6afc94def0592c9b2afb090b07d1a730d0a5da15 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 12 Jan 2017 04:12:22 +0000 Subject: [PATCH] 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 --- src/wp-includes/template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/template.php b/src/wp-includes/template.php index 636cb9005c..01f9c8a715 100644 --- a/src/wp-includes/template.php +++ b/src/wp-includes/template.php @@ -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 );