Making WordPress.org


Ignore:
Timestamp:
12/08/2023 05:14:07 AM (10 months ago)
Author:
tellyworth
Message:

Plugin directory: add blueprints field to api

Related r13035

See #7251.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin.php

    r12533 r13036  
    225225        // Fun fact: ratings are stored as 1-5 in postmeta, but returned as percentages by the API
    226226        $result['author_block_rating'] = get_post_meta( $post_id, 'author_block_rating', true ) ? 20 * get_post_meta( $post_id, 'author_block_rating', true ) : $result['rating'];
     227
     228        // Blueprints, if available
     229        $result['blueprints'] = Template::get_blueprints( $post ) ?: [];
    227230
    228231        // Translations.
Note: See TracChangeset for help on using the changeset viewer.