Making WordPress.org

Opened 10 years ago

Closed 10 years ago

#589 closed defect (bug) (invalid)

Icon is not sent back in single-plugin wordpress-api request

Reported by: programmin's profile programmin Owned by:
Milestone: Priority: normal
Component: General Keywords:
Cc:

Description

While the paged serialized query to "https://api.wordpress.org/plugins/info/1.0/" around line 74 of wp-admin/includes/plugin-install.php is apparently succeeding in fetching the icons for each of the plugins, the icon is not returned in a simple single-plugin query.

For example, http://api.wordpress.org/plugins/info/1.0/jetpack doesn't have serialized icon array, although it obviously has an icon in the WP plugin installer.

Change History (1)

#1 @Otto42
10 years ago

  • Resolution set to invalid
  • Status changed from new to closed

This is incorrect. Icons will be return in plugin information requests, however icons have to be specifically requested for the data about them to be returned.

The same goes for much of the data that can be returned by the API, if it's not needed for the specific request, then it saves a fair amount of work on the servers to not have to pull it out and process it.

Example WordPress code showing how to get specific plugin information with the icons:

plugins_api('plugin_information', 
   array( 'slug' => 'jetpack', 'fields' => array( 'icons' => true ) ) 
);

Additionally, if you examine trunk's wp-admin/includes/class-wp-plugin-install-list-table.php on line 101, you'll see that the "icons" value in the fields parameter is being set to true here, so that the "query_plugins" request down on line 169 will retrieve the icon information.

Note: See TracTickets for help on using tickets.