2

I am trying to get the list of Wordpress plugins using the Wordpress Plugin API in a PHP page.

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

I read lots of articles regarding this but they show how to do it inside Wordpress.

So, can you help me out how to get the list of all the plugins in a table in PHP page which can be searched through the search bar on the top?

Like how we can search the plugins inside Wordpress while adding a new plugin, I want it the same way in a PHP page. I tried lots of coding but ended up confusing myself.

Any help will be really appreciated.

  • The same question is asked here but unanswered. So, I had to open another one. Sorry for this trouble. wordpress.stackexchange.com/questions/170517/… – Paras Shah May 2 '15 at 5:12
  • Welcome to WordPress Development. I think this question is both too wide and off topic, since you don't want to use WordPress for this task. Best of luck with your project. – birgire May 2 '15 at 6:54
  • @birgire This is clearly on topic. The wordpress.org API is a WP dev topic, and using WP for all tasks is not a requirement here. – fuxia May 2 '15 at 7:51
  • @ParasShah For alist of slugs, you can use just plugins.svn.wordpress.org. That doesn’t provide visible names and descriptions. – fuxia May 2 '15 at 7:54
  • Thank You @toscho for helping me out. I've posted the answer below through which I was able to implement what I wanted. Hope that helps. – Paras Shah May 2 '15 at 11:06
2

Guys I found the answer. Well, after a lot of changes in codes, I finally did it through API.

Through that PHP page, you can search in any plugin which exist in Wordpress Repository.

Sorry, I cannot include the code because it's too long.

Basically, I am just listing down in short what exactly I did.

First of all I included a PHP cURL script through CallAPI function. (I copied the same script which is included in the most-voted answer of this question: https://stackoverflow.com/questions/21182946/using-curl-to-get-api-data-within-php)

Then, I added actions and requests to that PHP script as explained here: http://code.tutsplus.com/articles/interacting-with-wordpress-plug-in-theme-api--wp-25805

After this, I unserialized the execution of the CallAPI function

Through this, I got all the info that I needed. Finally, I then made a table in foreach loop so that details of each and every plugin will show up by loop according to what I wanted to show.

For eg: I only wanted to show the Name, Author, Plugin Version and Downloads. So, according to that I changed the elements of the table.

Through this, I can see 25 last updated wordpress plugins on opening that PHP page and when searched, I can find out any plugin from the Wordpress Repository.

The only thing which is missing is live AJAX search which I am trying to implement now.

Hope this explanation will help you guys.

After shortening that code, I'll add it here. (If possible!)

0

You can not get "list of all" wordpress plugin from api.wordpress , this api is set to display information about single plugin when you pass it a plugin slug.

To get list of all published wordpress plugins you can try this page http://plugins.svn.wordpress.org/ or You can scrape plugin slug from this page https://wordpress.org/plugins

  • No. @Ibrahim Read the answer I posted. I found the answer. You can extract the data of all the plugins in the wordpress repository through its API. – Paras Shah May 6 '15 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.