[wp-meta] [Making WordPress.org] #1155: Plugin API should include active installs

Making WordPress.org noreply at wordpress.org
Fri Jul 31 08:22:04 UTC 2015


#1155: Plugin API should include active installs
-------------------------+-------------------------------
  Reporter:  McGuive7    |      Owner:
      Type:  defect      |     Status:  closed
  Priority:  normal      |  Component:  api.wordpress.org
Resolution:  worksforme  |   Keywords:
-------------------------+-------------------------------
Changes (by swissspidy):

 * keywords:  needs-patch dev-feedback =>
 * status:  new => closed
 * resolution:   => worksforme


Comment:

 The API doesn't send active_installs by default, but you can totally fetch
 that data if you need it. For example, this is what I do in a plugin of
 mine:


 {{{
 require_once ABSPATH . 'wp-admin/includes/plugin-install.php';

 $args = array(
         'author'   => $username,
         'per_page' => 10,
         'fields'   => array(
                 'author'          => false,
                 'active_installs' => true,
                 'banners'         => true,
                 'compatibility'   => false,
                 'description'     => false,
                 'downloaded'      => false,
                 'homepage'        => false,
                 'icons'           => true,
                 'last_updated'    => true,
                 'num_ratings'     => false,
                 'ratings'         => false,
         ),
 );

 $data = plugins_api( 'query_plugins', $args );
 }}}

 Works like a charm.

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/1155#comment:2>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list