[wp-trac] [WordPress Trac] #43192: Switch Plugins & Themes to use the `info/1.2` API endpoints
WordPress Trac
noreply at wordpress.org
Thu Feb 1 05:06:04 UTC 2018
#43192: Switch Plugins & Themes to use the `info/1.2` API endpoints
-----------------------------+-----------------
Reporter: dd32 | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: 5.0
Component: Upgrade/Install | Version:
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------
Currently the Plugin & Theme API uses the "old" php serialized endpoint
available at `info/1.0`.
We should switch to using the latest endpoint, which for both plugins and
themes is `info/1.2`.
There's a few notable changes in the API:
- JSON instead of PHP
- GET requests only, to aid in network caching (the WordPress version is
also sent in the URL to allow differentiation on the server-side)
- JSON doesn't allow us to return both assoc arrays and objects, so
there's some back-compat casting involved client-side
- The endpoint may now return a more specific error message than
"something went wrong" (which may have meant, "That's a 404")
- The fields returned by the endpoint have changed, and match what
WordPress (trunk) currently uses. That means there's no need to send
feature flags (`fields`) in 5.0, but future versions can do so.
- The Plugin Contributor details are returned with full names (#29274)
- The Theme Authors are now returned with full names too
Most of the relevant API changes are on
https://meta.trac.wordpress.org/ticket/111
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43192>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list