mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
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:
parent
7c8c385a3c
commit
7ddbabb3db
@ -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' ) );
|
||||
|
Loading…
Reference in New Issue
Block a user