Skip to content

Instantly share code, notes, and snippets.

@jimboobrien
Forked from wpscholar/is_plugin_active.php
Created September 20, 2017 23:29
Show Gist options
  • Save jimboobrien/9c3bc6f4f3093426fce633addf33ea66 to your computer and use it in GitHub Desktop.
Save jimboobrien/9c3bc6f4f3093426fce633addf33ea66 to your computer and use it in GitHub Desktop.
Test if a WordPress plugin is active
<?php
/**
* Test if a WordPress plugin is active
*/
if ( is_plugin_active('plugin-directory/plugin-file.php') ) {
// the plugin is active
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment