Skip to content

Commit a695820

Browse files
committed
Compare status as expected array, appending prepared theme
1 parent 8ff7db4 commit a695820

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,9 @@ public function get_items( $request ) {
200200
$current_theme = wp_get_theme();
201201
$status = $request['status'];
202202

203-
if ( 'active' === $status ) {
204-
$themes[] = $this->prepare_item_for_response( $current_theme, $request );
203+
if ( array( 'active' ) === $status ) {
204+
$prepared = $this->prepare_item_for_response( $current_theme, $request );
205+
$themes[] = $this->prepare_response_for_collection( $prepared );
205206
} else {
206207
$active_themes = wp_get_themes();
207208

0 commit comments

Comments
 (0)