Skip to content

Instantly share code, notes, and snippets.

@danlamanna
Created October 5, 2012 18:52
Show Gist options
  • Save danlamanna/3841664 to your computer and use it in GitHub Desktop.
Save danlamanna/3841664 to your computer and use it in GitHub Desktop.
// Check dependencies
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
if (!is_plugin_active('gravityforms/gravityforms.php')) {
add_action('admin_notices', function() {
echo '<div class="error"><p>This plugin requires the Gravity Forms plugin to be enabled, and is not currently running.</p></div>';
});
if (class_exists('Burst')) {
Burst::log("Gravity Forms dependency unmet.", BURST_CRITICAL);
}
// Skip loading the rest of the plugin, dependency check failed.
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment