Translate page template names! Have WP_Theme::get_page_templates() return templates keyed by filename, not by template name, as it makes more sense. Flip this in get_page_templates() to be compatible. fixes #6007.

git-svn-id: https://develop.svn.wordpress.org/trunk@20041 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2012-02-29 20:18:53 +00:00
parent 6a4a8df204
commit cdaee9042d
2 changed files with 4 additions and 4 deletions

View File

@@ -81,7 +81,7 @@ function delete_theme($template, $redirect = '') {
* @return array Key is the template name, value is the filename of the template
*/
function get_page_templates() {
return wp_get_theme()->get_page_templates();
return array_flip( wp_get_theme()->get_page_templates() );
}
/**