diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php index c2069b21bc..089a5215ba 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php @@ -95,6 +95,11 @@ class WP_REST_Block_Directory_Controller extends WP_REST_Controller { $result = array(); foreach ( $response->plugins as $plugin ) { + // If the API returned a plugin with empty data for 'blocks', skip it. + if ( empty( $plugin['blocks'] ) ) { + continue; + } + $data = $this->prepare_item_for_response( $plugin, $request ); $result[] = $this->prepare_response_for_collection( $data ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index a8fdb969ef..f817e15b61 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-48841'; +$wp_version = '5.6-alpha-48842'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.