Forked from Shelob9/check-if-caldera-forms-is-active.php
Last active
September 22, 2020 04:12
-
-
Save dankerizer/2ecab2453f6cc2a831c953d38a3255d9 to your computer and use it in GitHub Desktop.
Check If Caldera Form is Active or Not
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
<?php | |
/** | |
* function to Check if Caldera Forms is active | |
*/ | |
function is_caldera_form_active(){ | |
if (!function_exists('is_plugin_active')) { | |
include_once(ABSPATH . 'wp-admin/includes/plugin.php'); | |
} | |
if (is_plugin_active('caldera-forms/caldera-core.php') || defined('CFCORE_VER')) { | |
return true; | |
} | |
return false; | |
} |
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
<?php | |
add_action( 'caldera_forms_includes_complete', 'my_addon_init' ); | |
function my_addon_init(){ | |
//start your Caldera Form add-on code here, since Caldera Forms is loaded and Caldera Forms Autoloader is inititialized | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment