Make WordPress Core

Changeset 49559


Ignore:
Timestamp:
11/10/2020 08:24:38 PM (4 years ago)
Author:
helen
Message:

Editor: Display short description from block directory in results.

Props dd32, ryelle.
Fixes #51212.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php

    r49108 r49559  
    126126            'name'                => $block_data['name'],
    127127            'title'               => ( $block_data['title'] ? $block_data['title'] : $plugin['name'] ),
    128             'description'         => wp_trim_words( $plugin['description'], 30, '...' ),
     128            'description'         => wp_trim_words( $plugin['short_description'], 30, '...' ),
    129129            'id'                  => $plugin['slug'],
    130130            'rating'              => $plugin['rating'] / 20,
  • trunk/tests/phpunit/tests/rest-api/rest-block-directory-controller.php

    r48937 r49559  
    154154            'name'                => 'sortabrilliant/guidepost',
    155155            'title'               => 'Guidepost',
    156             '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...',
     156            'description'         => 'A guidepost gives you directions. It lets you know where you’re going. It gives you a preview of what’s to come.',
    157157            'id'                  => 'guidepost',
    158158            'rating'              => 4.3,
Note: See TracChangeset for help on using the changeset viewer.