Making WordPress.org


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

API: Plugin & Theme Directory: Use the new constants to determine which API version we're running on.

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.php

    r6485 r6486  
    125125        }
    126126
    127         // Backwards compatibility; the API returns null in case of error..
    128         // This is now feature-flagged by the PLUGINS_API_SUPPORTS_ERRORS constant which is defined as `true` in info/1.2 and later.
    129         if ( isset( $response['error'] ) && ( defined( 'PLUGINS_API_SUPPORTS_ERRORS' ) && ! PLUGINS_API_SUPPORTS_ERRORS ) ) {
     127        // Backwards compatibility; the API returns null in case of error for the 1.0/1.1 API endpoints.
     128        if ( isset( $response['error'] ) && defined( 'PLUGINS_API_VERSION' ) && PLUGINS_API_VERSION < 1.2 ) {
    130129            $this->output( null );
    131130            return;
Note: See TracChangeset for help on using the changeset viewer.