diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php index e76940f7b7..c3cf4938a2 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php @@ -125,7 +125,7 @@ class WP_REST_Block_Directory_Controller extends WP_REST_Controller { $block = array( 'name' => $block_data['name'], 'title' => ( $block_data['title'] ? $block_data['title'] : $plugin['name'] ), - 'description' => wp_trim_words( $plugin['description'], 30, '...' ), + 'description' => wp_trim_words( $plugin['short_description'], 30, '...' ), 'id' => $plugin['slug'], 'rating' => $plugin['rating'] / 20, 'rating_count' => (int) $plugin['num_ratings'], diff --git a/tests/phpunit/tests/rest-api/rest-block-directory-controller.php b/tests/phpunit/tests/rest-api/rest-block-directory-controller.php index 3060efb0c1..940040e723 100644 --- a/tests/phpunit/tests/rest-api/rest-block-directory-controller.php +++ b/tests/phpunit/tests/rest-api/rest-block-directory-controller.php @@ -153,7 +153,7 @@ class WP_REST_Block_Directory_Controller_Test extends WP_Test_REST_Controller_Te $expected = array( 'name' => 'sortabrilliant/guidepost', 'title' => 'Guidepost', - 'description' => 'A guidepost gives you directions. It lets you know where you’re going. It gives you a preview of what’s to come. How does it work? Guideposts are magic, no they...', + 'description' => 'A guidepost gives you directions. It lets you know where you’re going. It gives you a preview of what’s to come.', 'id' => 'guidepost', 'rating' => 4.3, 'rating_count' => 90,