|
| 1 | +<?php |
| 2 | + |
| 3 | +// don't load directly |
| 4 | +if ( ! defined( 'ABSPATH' ) ) { |
| 5 | + die(); |
| 6 | +} |
| 7 | + |
| 8 | +/** |
| 9 | +Plugin Name: Gravity Forms Breeze Add-On |
| 10 | +Plugin URI: https://gravityforms.com |
| 11 | +Description: Integrates Gravity Forms with Breeze, allowing form submissions to be automatically sent to your Breeze account. |
| 12 | +Version: 1.5 |
| 13 | +Author: Gravity Forms |
| 14 | +Author URI: https://gravityforms.com |
| 15 | +License: GPL-2.0+ |
| 16 | +Text Domain: gravityformsbreeze |
| 17 | +Domain Path: /languages |
| 18 | +
|
| 19 | +------------------------------------------------------------------------ |
| 20 | +Copyright 2009-2020 Rocketgenius, Inc. |
| 21 | +
|
| 22 | +This program is free software; you can redistribute it and/or modify |
| 23 | +it under the terms of the GNU General Public License as published by |
| 24 | +the Free Software Foundation; either version 2 of the License, or |
| 25 | +(at your option) any later version. |
| 26 | +
|
| 27 | +This program is distributed in the hope that it will be useful, |
| 28 | +but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 29 | +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 30 | +GNU General Public License for more details. |
| 31 | +
|
| 32 | +You should have received a copy of the GNU General Public License |
| 33 | +along with this program; if not, write to the Free Software |
| 34 | +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 35 | + */ |
| 36 | + |
| 37 | +define( 'GF_BREEZE_VERSION', '1.5' ); |
| 38 | + |
| 39 | +// If Gravity Forms is loaded, bootstrap the Breeze Add-On. |
| 40 | +add_action( 'gform_loaded', array( 'GF_Breeze_Bootstrap', 'load' ), 5 ); |
| 41 | + |
| 42 | +/** |
| 43 | + * Class GF_Breeze_Bootstrap |
| 44 | + * |
| 45 | + * Handles the loading of the Breeze Add-On and registers with the Add-On Framework. |
| 46 | + */ |
| 47 | +class GF_Breeze_Bootstrap { |
| 48 | + |
| 49 | + /** |
| 50 | + * If the Feed Add-On Framework exists, Breeze Add-On is loaded. |
| 51 | + * |
| 52 | + * @access public |
| 53 | + * @static |
| 54 | + */ |
| 55 | + public static function load() { |
| 56 | + |
| 57 | + if ( ! method_exists( 'GFForms', 'include_feed_addon_framework' ) ) { |
| 58 | + return; |
| 59 | + } |
| 60 | + |
| 61 | + require_once( 'class-gf-breeze.php' ); |
| 62 | + |
| 63 | + GFAddOn::register( 'GF_Breeze' ); |
| 64 | + |
| 65 | + } |
| 66 | + |
| 67 | +} |
| 68 | + |
| 69 | +/** |
| 70 | + * Returns an instance of the GF_Breeze class |
| 71 | + * |
| 72 | + * @see GF_Breeze::get_instance() |
| 73 | + * @return object GF_Breeze |
| 74 | + */ |
| 75 | +function gf_breeze() { |
| 76 | + return GF_Breeze::get_instance(); |
| 77 | +} |
0 commit comments