Last active
December 11, 2022 12:18
-
-
Save niranyousuf/08929c294040acbce52508c13ea66bf0 to your computer and use it in GitHub Desktop.
WordPress Active installation display on site
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_once(ABSPATH . 'wp-admin/includes/plugin-install.php'); | |
$args = [ | |
'slug' => 'YOUR PLUGIN NAME', | |
'fields' => [ | |
'short_description' => false, | |
'icons' => true, | |
'reviews' => false, | |
],]; | |
$data = plugins_api('plugin_information', $args); | |
echo $data->active_installs; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment