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:


While the paged serialized query to "" 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, 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:

   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.