get_page_templates inconsistent use capitals
|Reported by:||rvdk||Owned by:|
I noticed this when using the Flutter plugin.
Somehow I did not get the templates I generated any more. For the record my template name was: Commond
I discovered that the following file/function was the problem:
/wp-admin/includes/theme.php line: 125 - 128
$themes = get_themes();
Returns an associated array with theme names in lowercase
$theme = get_current_theme();
retrieved the name with a capital C
$templates = $themes[$theme]Template Files?;
resulted in null.
By changing line 126 to:
$theme = strtolower(get_current_theme());
I managed to solve this issue.