Add some page template validation

git-svn-id: https://develop.svn.wordpress.org/trunk@7921 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-05-12 23:51:54 +00:00
parent eb744058fb
commit 9faab00411
3 changed files with 17 additions and 17 deletions
+1 -1
View File
@@ -419,7 +419,7 @@ function get_page_template() {
if ( 'default' == $template )
$template = '';
if ( !empty($template) && file_exists(TEMPLATEPATH . "/$template") )
if ( !empty($template) && !validate_file($template) && file_exists(TEMPLATEPATH . "/$template") )
$template = TEMPLATEPATH . "/$template";
elseif ( file_exists(TEMPLATEPATH . "/page.php") )
$template = TEMPLATEPATH . "/page.php";