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

git-svn-id: http://svn.automattic.com/wordpress/trunk@20318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-03-29 05:39:26 +00:00
parent 7c8c385a3c
commit 7ddbabb3db

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' ) );