Making WordPress.org

Changeset 3864


Ignore:
Timestamp:
08/26/2016 09:27:25 PM (8 years ago)
Author:
obenland
Message:

Plugin Directory: Add support information to API response.

Allows us toe rebuild the support loading bar in React.

See #1579, #1719.

File:
1 edited

Legend:

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

    r3863 r3864  
    8888        $result['ratings'] = array_map( 'intval', (array) get_post_meta( $post_id, 'ratings', true ) );
    8989        $result['num_ratings'] = array_sum( $result['ratings'] );
     90        $result['support_threads'] = get_post_meta( $post_id, 'support_threads', true ) ?: 0;
     91        $result['support_threads_resolved'] = get_post_meta( $post_id, 'support_threads_resolved', true ) ?: 0;
    9092        $result['active_installs'] = (int)get_post_meta( $post_id, 'active_installs', true );
    9193        $result['downloaded'] = get_post_meta( $post_id, 'downloads', true );
Note: See TracChangeset for help on using the changeset viewer.