WordPress.org

Making WordPress.org

Changeset 6487


Ignore:
Timestamp:
01/31/2018 04:19:08 AM (4 years ago)
Author:
dd32
Message:

API: Plugin Directory: In the info/1.2 API default to sending a more complete contributors response.

See #111

File:
1 edited

Legend:

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

    r6485 r6487  
    119119        }
    120120
    121         // In WordPress x.y we start sending 'contributors' which means respond with a more detailed list of contributors.
    122         if ( ! isset( $this->requested_fields['contributors'] ) ) {
     121        // In the 1.2+ version of the info API, we default to returning a more detailed list of contributors.
     122        // This can be enabled in older versions of the API by passing the 'contributors' field.
     123        if ( defined( 'PLUGINS_API_VERSION' ) && PLUGINS_API_VERSION >= 1.2 ) {
     124            $fields['contributors'] = true;
     125        } elseif ( ! isset( $this->requested_fields['contributors'] ) ) {
    123126            $fields['bare_contributors'] = true;
    124127        }
Note: See TracChangeset for help on using the changeset viewer.