[wp-trac] [WordPress Trac] #12801: Add Info link to plugins management screen

WordPress Trac noreply at wordpress.org
Mon Jul 29 02:22:05 UTC 2013


#12801: Add Info link to plugins management screen
-----------------------------+-----------------------------
 Reporter:  jane             |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Future Release
Component:  Administration   |     Version:  3.0
 Severity:  normal           |  Resolution:
 Keywords:  ui-focus         |
-----------------------------+-----------------------------

Comment (by stephanethomas):

 A peer (@fredrocious) and I had the opportunity to dig into this issue
 during a WordCamp. I thought it would be a good idea to share our
 findings. In order to add this new link on the page listing all the
 plugins that have been installed, we had a look to the
 WP_Plugins_List_Table->single_row() method. The difficult part is
 retrieving the plugin slug used on the WordPress.org plugin repository
 from the list of plugins currently installed, so we can query the
 WordPress.org API with the right parameters at:

   http://api.wordpress.org/plugins/info/1.0/

 The patch attached shows this approach which unfortunately doesn't work in
 all cases - such as when a plugin doesn't live in its own directory (e.g.
 the Hello Dolly plugin which is a sole file in the plugins root
 directory). As plugins don't know where they are coming from, it seems
 there isn't any good way to identify precisely a plugin (we could have a
 look to the plugin header, but information here is not reliable).

 However, we could maybe take advantage of the API endpoint that is used to
 check if plugins need to be updated at:

   http://api.wordpress.org/plugins/update-check/1.0/

 This endpoint seems to have some sort of logic that can handle different
 plugin directory structures and determine matchings between installed
 plugins and plugins available on the WordPress.org repository. We could
 call it with version numbers set to 0 to trick it to give us the list of
 corresponding slugs for each plugin installed. However, this is clearly
 not a clean solution. A better approach would probably be to implement
 another endpoint in the WordPress.org API that would allow to achieve
 this.

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


More information about the wp-trac mailing list