Skip to content

Instantly share code, notes, and snippets.

@artboard-studio
Created September 27, 2013 14:41
Show Gist options
  • Save artboard-studio/6729644 to your computer and use it in GitHub Desktop.
Save artboard-studio/6729644 to your computer and use it in GitHub Desktop.
WordPress: if plugin is installed and activated
<?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); ?>
<?php is_plugin_active($plugin) ?>
// example:
<?php
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
If (is_plugin_active('plugin-directory/plugin-file.php')) {
//plugin is activated
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment