0

I am running a query against the WordPress.org Plugin API that looks like this went built:

https://api.wordpress.org/plugins/info/1.1/?action=query_plugins&request[per_page]=10&request[browse]=popular&request[page]=1

This works great. Now I want to reduce the amount of data that is being returned in each request by passing in fields that shouldn't be displayed like so:

https://api.wordpress.org/plugins/info/1.1/?action=query_plugins&request[per_page]=10&request[browse]=popular&request[fields][description]=false&request[page]=1

Problem is, this doesn't work. I still get back the description field. Any ideas on what I'm doing wrong?

  • this is border line on topic. A better place to ask is probably the relevant slack channel – Mark Kaplun May 7 '18 at 4:05
  • @MarkKaplun - I'm not familiar with the relevant slack channel. Can you direct me? – davemackey May 7 '18 at 16:26
  • 1
    in the wordpress.org slack (you will have to have a wordpress.org user IIRC) just ask on the main channel where to ask wordpress.org API questions – Mark Kaplun May 7 '18 at 16:47
1

HT to otto42 on the WordPress Slack who pointed out that false might be evaluating as true and to instead try using 0...which I did and it worked:

https://api.wordpress.org/plugins/info/1.1/?action=query_plugins&request[per_page]=10&request[browse]=popular&request[fields][description]=0&request[page]=1

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.