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
This commit is contained in:
Andrew Nacin 2013-11-15 16:41:39 +00:00
parent f135b9b540
commit 33cce1d7d7
1 changed files with 2 additions and 1 deletions

View File

@ -354,7 +354,7 @@ function themes_api( $action, $args = null ) {
* @param array $themes Optional. Array of WP_Theme objects to prepare. * @param array $themes Optional. Array of WP_Theme objects to prepare.
* Defaults to all allowed themes. * 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 ) { function wp_prepare_themes_for_js( $themes = null ) {
if ( null === $themes ) { if ( null === $themes ) {
@ -370,6 +370,7 @@ function wp_prepare_themes_for_js( $themes = null ) {
$updates = $updates->response; $updates = $updates->response;
} }
WP_Theme::sort_by_name( $themes );
foreach( $themes as $slug => $theme ) { foreach( $themes as $slug => $theme ) {
$parent = false; $parent = false;
if ( $theme->parent() ) { if ( $theme->parent() ) {