[wp-meta] [Making WordPress.org] #589: Icon is not sent back in single-plugin wordpress-api request
Making WordPress.org
noreply at wordpress.org
Wed Aug 27 02:28:34 UTC 2014
#589: Icon is not sent back in single-plugin wordpress-api request
-------------------------+---------------------
Reporter: programmin | Owner:
Type: defect | Status: closed
Priority: normal | Component: General
Resolution: invalid | Keywords:
-------------------------+---------------------
Changes (by Otto42):
* status: new => closed
* resolution: => invalid
Comment:
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.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/589#comment:1>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list