mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
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:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user