diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php index 71dbcb6193..075be9efe4 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php @@ -326,6 +326,10 @@ class WP_REST_Themes_Controller extends WP_REST_Controller { } } + if ( rest_is_field_included( 'is_block_theme', $fields ) ) { + $data['is_block_theme'] = $theme->is_block_theme(); + } + $data = $this->add_additional_fields_to_object( $data, $request ); // Wrap the data in a response object. @@ -494,6 +498,11 @@ class WP_REST_Themes_Controller extends WP_REST_Controller { ), ), ), + 'is_block_theme' => array( + 'description' => __( 'Whether the theme is a block-based theme.' ), + 'type' => 'boolean', + 'readonly' => true, + ), 'name' => array( 'description' => __( 'The name of the theme.' ), 'type' => 'object', diff --git a/wp-includes/version.php b/wp-includes/version.php index 6ffd42b459..72cff7172d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-55950'; +$wp_version = '6.3-alpha-55951'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.