Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#43192 closed task (blessed) (fixed)

Switch Plugins & Themes to use the `info/1.2` API endpoints

Reported by: dd32's profile dd32 Owned by: dd32's profile dd32
Milestone: 5.1 Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords:
Focuses: Cc:

Description

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

Change History (6)

#1 @dd32
7 years ago

In 42631:

Plugins: Use api.wordpress.org/plugins/info/1.2/ for querying plugins & plugin information.

See #43192.
Fixes #29274.

#2 @dd32
7 years ago

In 42632:

Themes: Use api.wordpress.org/themes/info/1.2/ to query theme information.

See #43192.

#3 @dd32
7 years ago

  • Owner set to dd32
  • Status changed from new to accepted

It's worth noting that the wp-admin and customizer theme interfaces are same-but-different and actually present very little information. There's probably a few more things we can do here to make the UI a little more useful to everyone, such as:

  • Including active installs text
  • Including star ratings
  • Including author links (although, where do they link to? profiles.wordpress.org? author homepage? etc)

I'm leaving this ticket open for bug reports, but hopefully i caught them all.

#4 @SergeyBiryukov
7 years ago

In 42686:

Plugins: Use correct variable name in install_plugin_information().

Props afragen.
Fixes #43282. See #43192, #29274.

#5 @dd32
7 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

If anything comes up here, new ticket & @mention me please.

#6 @johnbillion
7 years ago

  • Milestone changed from 5.0 to 5.1
Note: See TracTickets for help on using tickets.