[wp-trac] [WordPress Trac] #20001: Update plugins_api to return short_description when querying 'plugin_information'

WordPress Trac wp-trac at lists.automattic.com
Thu Feb 9 18:12:56 UTC 2012


#20001: Update plugins_api to return short_description when querying
'plugin_information'
--------------------------------+------------------------------
 Reporter:  DJPaul              |       Owner:
     Type:  feature request     |      Status:  closed
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  WordPress.org site  |     Version:
 Severity:  normal              |  Resolution:  worksforme
 Keywords:                      |
--------------------------------+------------------------------
Changes (by nacin):

 * status:  new => closed
 * resolution:   => worksforme


Comment:

 Try this: `plugins_api( 'plugin_information', array( 'slug' => 'jetpack',
 'fields' => array( 'short_description' => true ) ) );`

 Allowed fields and their global defaults:
 {{{
 'short_description' => true,
 'description' => false,
 'sections' => true,
 'tested' => true,
 'requires' => true,
 'rating' => true,
 'downloaded' => true,
 'downloadlink' => true,
 'last_updated' => true,
 'added' => true,
 'tags' => true,
 'compatibility' => true,
 'homepage' => true,
 'versions' => false,
 }}}

 For query_plugins, these defaults take precedence:
 {{{
 'description' => true,
 'sections' => false,
 'downloaded' => false,
 'downloadlink' => false,
 'last_updated' => false,
 'added' => false,
 'tags' => false,
 }}}

 For plugin_information, additionally, `'short_description' => false`.

 To turn on/off any field that is/is not included by default, simply pass
 `'fields' => array( 'some_field' => true/false ) )`.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20001#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list