From e0657e6904e308d1df421905f273e881d926863a Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Wed, 22 Apr 2015 16:11:25 +0000 Subject: [PATCH] Don't return empty themes in `wp_prepare_themes_for_js()`. see #32002. Built from https://develop.svn.wordpress.org/trunk@32264 git-svn-id: http://core.svn.wordpress.org/trunk@32235 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/theme.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php index 47070cc756..4a9cfbc203 100644 --- a/wp-admin/includes/theme.php +++ b/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 ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 03cb98bb3c..10ce2e0f09 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-RC3-32261'; +$wp_version = '4.2-RC3-32264'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.