Created
October 5, 2012 18:52
-
-
Save danlamanna/3841664 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// 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