This was taken from the WordPress Codex reference for is_plugin_active
In the Admin Area:
1 |
is_plugin_active($plugin); |
In the front end of a theme you need to include a reference to the following library
1 2 |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); is_plugin_active($plugin); |
In this case $plugin is the directory of the plugin followed by the main php file. In this example below the event Event Espresso plugin directory is used.
1 |
$plugin = event-espresso/espresso.php |