Skip to content

Instantly share code, notes, and snippets.

@NikV
Created July 14, 2015 04:12
Show Gist options
  • Save NikV/4aee2541fec3f7be9cb6 to your computer and use it in GitHub Desktop.
Save NikV/4aee2541fec3f7be9cb6 to your computer and use it in GitHub Desktop.
Example for gfrom_loaded
/**
* Fires the class when Gravity Forms has loaded
*/
add_action('gform_loaded', array('GF_Simple_Addon_bootstrap', 'load'), 5);
/**
* Class GF_Test is our Bootstrap class, it loads a lot of the important stuff, like files
*/
class GF_Simple_slack_bootstrap {
/**
* The function to require add-on files and Register the add-on class
*/
public static function load() {
if( ! method_exists('GFForms', 'include_payment_addon_framework') ) {
return;
}
// Require our class file, this is where th GFAddOn will go
require_once('class.gf-simple-add-on.php');
// Let's register our add-on Class with Gravity Forms (It will extend the main GFAddOn Class
GFAddOn::register( 'GFSimpleAddon' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment