From 33cce1d7d74d00200a8ee241200c7b6e0ff894e1 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 15 Nov 2013 16:41:39 +0000 Subject: [PATCH] Sort themes by name on the new themes.php page. see #25948. git-svn-id: https://develop.svn.wordpress.org/trunk@26216 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/theme.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/theme.php b/src/wp-admin/includes/theme.php index 6d07a6531c..681d0769c3 100644 --- a/src/wp-admin/includes/theme.php +++ b/src/wp-admin/includes/theme.php @@ -354,7 +354,7 @@ function themes_api( $action, $args = null ) { * @param array $themes Optional. Array of WP_Theme objects to prepare. * Defaults to all allowed themes. * - * @return array An associative array of theme data. + * @return array An associative array of theme data, sorted by name. */ function wp_prepare_themes_for_js( $themes = null ) { if ( null === $themes ) { @@ -370,6 +370,7 @@ function wp_prepare_themes_for_js( $themes = null ) { $updates = $updates->response; } + WP_Theme::sort_by_name( $themes ); foreach( $themes as $slug => $theme ) { $parent = false; if ( $theme->parent() ) {