How To Check If Caldera Forms Is Active

The Catdera mascot for Caldera Labs playing with the Caldera globe logo

If you are writing a Caldera Forms add-on or site-specific code for Caldera Forms it is wise to check if Caldera Forms is active before running that code. The best way to check if Caldera Forms is active is to check if the CFCORE_VER constant is defined:

The earliest hook you can run this check at is <a href=””>plugins_loaded</a>. It is recommended to wait until after the <a href=””>caldera_forms_includes_complete</a> hook. This hook runs in a function hooked to plugins_loaded, with priority 0. That function loads Caldera Forms internals and sets up the <a href=””>Caldera Forms autoloader</a>. Then it fires the <a href=””>caldera_forms_includes_complete</a> action.