Support page templates located in a subdirectory of the theme. fixes #11216.

git-svn-id: https://develop.svn.wordpress.org/trunk@20318 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-03-29 05:39:26 +00:00
parent 78d11eedea
commit f73f48301c
1 changed files with 1 additions and 1 deletions

View File

@ -997,7 +997,7 @@ final class WP_Theme implements ArrayAccess {
return $page_templates;
$page_templates = array();
$files = (array) self::scandir( $this->get_stylesheet_directory(), 'php' );
$files = (array) self::scandir( $this->get_stylesheet_directory(), 'php', 1 );
foreach ( $files['php'] as $file => $full_path ) {
$headers = get_file_data( $full_path, array( 'Template Name' => 'Template Name' ) );