On a whim this May bank holiday, tucked up on the sofa watching movies, I decided to create a plugin to display my favourited plugins on WordPress.org.
After a bit of digging I found you can use the plugins_api() function and pass it a username, e.g.:
plugins_api( 'query_plugins', array( 'user' => emirpprime, 'per_page' => '-1' ) );
This returns an object with some information about the results, then an array of plugins. A stripped down example of the structure is below:
A simple loop over the
plugins array will get all the details about a plugin you could want.
A short while later, and a rough and ready version is complete – a basic plugin that registers a shortcode and returns a list of a user’s plugins.
What does the plugin output?
Here are my favourites as an example – the markup is basic but easy to style, with a couple of classes for targetting. I’ve kept it simpler than the layout in wp-admin or the plugin repository, but hopefully with enough info to be useful:
What do you think? Is there any other info you think would be useful to include? Let me know in the comments.