WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 16 months ago

#12801 new feature request

Add Info link to plugins management screen

Reported by: jane Owned by:
Milestone: Future Release Priority: normal
Severity: minor Version: 3.0
Component: Plugins Keywords:
Focuses: ui, administration Cc:

Description (last modified by SergeyBiryukov)

Related to #11050 but instead of the search results, on the regular plugins.php screen. Add "Info" link to left of Activate/Deactivate action links, which brings in the tabbed info from the repo. If not from the repo, link does not appear.

Attachments (1)

12801.patch (1.1 KB) - added by stephanethomas 2 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 @piyushmishra5 years ago

Wont getting the info from Repo mean loading info of ver2.0 even if the user has ver1.0 installed?
Wont loading the same from the readme file on the plugin folder be better?

comment:2 @dd325 years ago

Wont getting the info from Repo mean loading info of ver2.0 even if the user has ver1.0 installed?

Yes, it would. Personally i'm leaning towards a "Tough luck, upgrade" point of view on that one..

Wont loading the same from the readme file on the plugin folder be better?

That is the other option, and is much simpler as well, If the file exists, we use it, if not, we dont show the link.

That would however require we bundle a Markdown parser with WordPress. Something we've not done since.. 1.x

comment:3 @nacin5 years ago

  • Milestone changed from Awaiting Triage to Future Release
  • Type changed from task (blessed) to feature request

comment:4 @sabreuse3 years ago

  • Component changed from UI to Administration
  • Keywords ui-focus added

comment:5 @SergeyBiryukov3 years ago

  • Description modified (diff)

@stephanethomas2 years ago

comment:6 @stephanethomas2 years ago

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.

comment:7 @fredrocious2 years ago

  • Cc fredrocious added

comment:8 @Thaicloud22 months ago

  • Cc Thaicloud added
  • Severity changed from normal to minor

Not sure if this is of any use, but I wrote a plugin which does grab this information from WP.org: http://wordpress.org/plugins/more-plugin-info/

One of the issues which I ran into was that the necessary API call is too slow to do for each installed plugin every time the plugins page loads. I allowed this behavior to be toggled on, but by default a manual sync needs to be run to collect info about each installed plugin.

Point being, unless there is an alternative way to grab this data- I do not think that such a small feature is worth such expensive API calls; thus, this might be best kept in the realm of plugins.

comment:9 @nacin19 months ago

  • Component changed from Administration to Plugins
  • Focuses administration added
Note: See TracTickets for help on using tickets.