From f73f48301cd29b0d89a466b976de6c61103a6e3b Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 29 Mar 2012 05:39:26 +0000 Subject: [PATCH] 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 --- wp-includes/class-wp-theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php index 998913c32f..7974848b63 100644 --- a/wp-includes/class-wp-theme.php +++ b/wp-includes/class-wp-theme.php @@ -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' ) );