From ca11d4c876281ebd3a73c516756289f03193c517 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Wed, 22 Apr 2015 16:10:40 +0000 Subject: [PATCH] Don't return empty themes in `wp_prepare_themes_for_js()`. see #32002. git-svn-id: https://develop.svn.wordpress.org/trunk@32264 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 47070cc756..4a9cfbc203 100644 --- a/src/wp-admin/includes/theme.php +++ b/src/wp-admin/includes/theme.php @@ -502,7 +502,8 @@ function wp_prepare_themes_for_js( $themes = null ) { * @param array $prepared_themes Array of themes. */ $prepared_themes = apply_filters( 'wp_prepare_themes_for_js', $prepared_themes ); - return array_values( $prepared_themes ); + $prepared_themes = array_values( $prepared_themes ); + return array_filter( $prepared_themes ); } /**