Fetching Active Install Count from the Plugins API

Today the wordpress.org plugins api got a small update. With the addition of the new Active Install metric a few weeks ago, now you can get the install count from the API for use in your own projects.

For example: Popup Maker currently has [plugin_install_count plugin=”popup-maker”]+ Active Installs

Here is a simple function that will grab the count and return it.

If you want to use it be sure to cache the value, best done using the transients api. Here is an example shortcode that can be used on the front end of your website to show the count. This is the exact code used above to display the current count for Popup Maker.

Feel free to customize this to your needs.

I am a founder & CEO of Code Atlantic and I've been working with WordPress for over 15 years creating plugins to help WP site owners grow for more than 10 of those. We have developed and maintained popular plugins including the best wordpress popup plugin, Popup Maker with over 4k 5 star reviews, as well as Content Control, Ahoy & User Menus.

Follow on:

Leave a Comment





This site uses Akismet to reduce spam. Learn how your comment data is processed.