mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Editor: Display short description from block directory in results.
Props dd32, ryelle. Fixes #51212. git-svn-id: https://develop.svn.wordpress.org/trunk@49559 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bde89301fd
commit
2a7d1e2394
@ -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'],
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user