public function init()
 {
     parent::init();
     if (isset($this->_min_gravityforms_version) && !$this->is_gravityforms_supported($this->_min_gravityforms_version)) {
         return;
     }
     /* Add a Use-your-Drive button to the advanced to the field editor */
     add_filter('gform_add_field_buttons', array($this, "useyourdrive_field"));
     add_filter('admin_enqueue_scripts', array($this, "useyourdrive_extra_scripts"));
     /* Now we execute some javascript technicalitites for the field to load correctly */
     add_action("gform_editor_js", array($this, "gform_editor_js"));
     add_filter('gform_field_input', array($this, "useyourdrive_input"), 10, 5);
     /* Add a custom setting to the field */
     add_action("gform_field_standard_settings", array($this, "useyourdrive_settings"), 10, 2);
     /* Adds title to the custom field */
     add_filter('gform_field_type_title', array($this, 'useyourdrive_title'));
     /* Filter to add the tooltip for the field */
     add_filter('gform_tooltips', array($this, 'add_useyourdrive_tooltips'));
     /* Save some data for this field */
     add_action('gform_pre_submission', array($this, 'useyourdrive_pre_submission_handler'));
     /* Display values in a proper way */
     add_filter('gform_entry_field_value', array($this, 'useyourdrive_entry_field_value'), 10, 4);
     add_filter('gform_entries_field_value', array($this, 'useyourdrive_entries_field_value'), 10, 4);
     add_filter('gform_merge_tag_filter', array($this, 'useyourdrive_merge_tag_filter'), 10, 5);
 }
Example #2
0
 function __construct()
 {
     $this->set_settings_on_activation();
     $this->_version = KWS_GF_Salesforce::version;
     parent::__construct();
     $plugins = $this->get_addon_setting('salesforce_integration');
     // If plugins are set, load'em up.
     if ($plugins !== NULL) {
         // Load the API plugin
         if ($plugins === 'api' || is_array($plugins) && !empty($plugins['api'])) {
             if (false === $this->is_incompatible_with_api() && !class_exists('GFSalesforce')) {
                 require_once KWS_GF_Salesforce::$plugin_dir_path . 'inc/salesforce-api.php';
             }
         }
         // Load the Web-to-Lead plugin - if the only plugin active or one of two
         if ($plugins === 'web2lead' || is_array($plugins) && !empty($plugins['web2lead'])) {
             if (!class_exists('KWSGFWebToLeadAddon') && KWS_GF_Salesforce::supports_addon_api()) {
                 require_once KWS_GF_Salesforce::$plugin_dir_path . 'inc/web-to-lead.php';
                 new KWSGFWebToLeadAddon();
             }
         }
     }
     // Add Daddy Analytics whether using Web-to-Lead or API
     if (!class_exists('KWSGFDaddyAnalyticsAddon') && KWS_GF_Salesforce::supports_addon_api()) {
         require_once KWS_GF_Salesforce::$plugin_dir_path . 'inc/daddy_analytics.addon.php';
         new KWSGFDaddyAnalyticsAddon();
     }
 }
 public static function load()
 {
     if (!method_exists('GFForms', 'include_feed_addon_framework')) {
         return;
     }
     require_once plugin_dir_path(__FILE__) . 'includes/class-gravity-forms-event-tracking-feed.php';
     GFAddOn::register('Gravity_Forms_Event_Tracking');
 }
 public function init_frontend()
 {
     parent::init_frontend();
     $recaptcha = new BU_GF_Google_reCAPTCHA();
     $recaptcha->setDisabled($this->get_plugin_setting('recaptcha_disabled'));
     add_filter('gform_validation', array($recaptcha, 'checkSubmission'));
     add_filter('gform_pre_render', array($recaptcha, 'render'));
 }
 public static function load()
 {
     if (!method_exists('GFForms', 'include_payment_addon_framework')) {
         return;
     }
     require_once 'class-gf-paypalpaymentspro.php';
     GFAddOn::register('GFPayPalPaymentsPro');
 }
Example #6
0
 public static function load()
 {
     if (!method_exists('GFForms', 'include_addon_framework')) {
         return;
     }
     require_once 'class-gf-polls.php';
     GFAddOn::register('GFPolls');
 }
Example #7
0
 public static function load()
 {
     if (!method_exists('GFForms', 'include_feed_addon_framework')) {
         return;
     }
     require_once 'class-gf-mailchimp.php';
     GFAddOn::register('GFMailChimp');
 }
Example #8
0
 public static function load()
 {
     if (!method_exists('GFForms', 'include_payment_addon_framework')) {
         return;
     }
     require_once 'class-gf-stripe.php';
     GFAddOn::register('GFStripe');
 }
 public static function load()
 {
     if (!method_exists('GFForms', 'include_addon_framework')) {
         return;
     }
     require_once 'class-sticky-list.php';
     GFAddOn::register('StickyList');
 }
 public static function load()
 {
     if (!method_exists('GFForms', 'include_feed_addon_framework')) {
         return;
     }
     require_once 'class-gf-facturadirecta.php';
     GFAddOn::register('GFFD');
 }
 public static function load()
 {
     if (!method_exists('GFForms', 'include_feed_addon_framework')) {
         return;
     }
     require_once 'class-gf-campaignmonitor.php';
     GFAddOn::register('GFCampaignMonitor');
 }
 public static function load()
 {
     if (!method_exists('GFForms', 'include_payment_addon_framework')) {
         return;
     }
     require_once 'gf-paydock.class.php';
     require_once 'envoy-field-settings.php';
     GFAddOn::register('GFPayDock');
 }
Example #13
0
 function feed_settings_fields()
 {
     if (is_numeric($_GET['id'])) {
         $feed_form_id = $_GET['id'];
         $form = GFAPI::get_form($feed_form_id);
     }
     $args = array('field_types' => array(), 'input_types' => array('text', 'name', 'email'), 'callback' => false);
     $fields = GFAddOn::get_form_fields_as_choices($form, $args);
     return array(array('title' => 'Postmatic', 'fields' => array(array('name' => 'feed_name', 'label' => 'Feed Name', 'type' => 'text'), array('name' => 'first_name', 'label' => 'First Name Field', 'type' => 'select', 'choices' => $fields), array('name' => 'last_name', 'label' => 'Last Name Field', 'type' => 'select', 'choices' => $fields), array('name' => 'email', 'label' => 'Email Field', 'type' => 'select', 'choices' => $fields, 'required' => true), array('name' => 'condition', 'tooltip' => "Configure the event that riggers the user to be subscribed to your Postmatic feed.", 'label' => 'Condition', 'type' => 'feed_condition', 'checkbox_label' => 'Enable condition for this subscription', 'instructions' => 'Subscribe this user if'))));
 }
 /**
  * Frontend initiates
  */
 public function init_frontend()
 {
     parent::init_frontend();
     // Start Session
     if (!session_id()) {
         session_start();
     }
     // Add Actions
     $this->add_actions();
 }
 public function init()
 {
     parent::init();
     add_action("gform_field_standard_settings", array($this, "add_enable_checkbox"), 10, 2);
     add_action("gform_editor_js", array($this, "editor_script"));
     add_filter("gform_entry_meta", array($this, "quiz_result_meta"), 10, 2);
     add_filter("gform_enqueue_scripts", array($this, "enqueue_quiz_styles"), 10, 2);
     add_filter("gform_field_content", array($this, "replace_field_labels"), 10, 5);
     add_action("gform_field_css_class", array($this, "add_class_to_quiz_questions"), 10, 3);
     add_action("gform_admin_pre_render", array($this, "add_merge_tags"));
     add_filter("gform_replace_merge_tags", array($this, "replace_merge_tags"), 10, 7);
 }
 /**
  * Init
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     $gforms_tmp_admin_forms = get_option('gforms_tmp_admin_forms', false);
     if ($gforms_tmp_admin_forms && is_array($gforms_tmp_admin_forms)) {
         foreach ($gforms_tmp_admin_forms as $form_id) {
             add_action('gform_after_submission_' . $form_id, array($this, 'maybe_api_submit'), 10, 2);
         }
     } else {
         add_action('gform_after_submission', array($this, 'maybe_api_submit'), 10, 2);
     }
 }
 public function init_frontend()
 {
     parent::init_frontend();
     //needed for print entry screen
     add_filter('gform_entry_field_value', array($this, 'signature_entry_detail'), 10, 5);
     add_action('gform_pre_submission', array($this, 'pre_submission_handler'));
     add_filter('gform_field_validation', array($this, 'signature_validation'), 10, 4);
     //displays signature field
     add_action('gform_field_input', array($this, 'signature_input'), 10, 5);
     //displays saved signature
     add_filter('gform_merge_tag_filter', array($this, 'merge_tag_filter'), 10, 4);
     add_action('gform_submission_values_pre_save', array($this, 'submission_values_pre_save'), 10, 2);
 }
 public static function load()
 {
     if (!class_exists('GFForms') || !class_exists('GFAddOn')) {
         return;
     }
     if (!method_exists('GFForms', 'include_feed_addon_framework')) {
         return;
     }
     GFForms::include_feed_addon_framework();
     require_once GFELOQUA_PATH . '/api/class.eloqua.api.php';
     require_once GFELOQUA_PATH . '/includes/helpers.php';
     require_once GFELOQUA_PATH . 'gfeloqua.class.php';
     GFAddOn::register('GFEloqua');
 }
Example #19
0
 public function rg_plugin_row()
 {
     if (!$this->_is_gravityforms_supported) {
         $message = sprintf(esc_html__('Gravity Forms %s is required. Activate it now or %spurchase it today!%s', 'gravityforms'), $this->_min_gravityforms_version, "<a href='http://www.gravityforms.com'>", '</a>');
         GFAddOn::display_plugin_message($message, true);
     } else {
         $version_info = $this->get_version_info($this->_slug);
         if (!rgar($version_info, 'is_valid_key')) {
             $title = $this->_title;
             if (version_compare($this->_version, $version_info['version'], '<')) {
                 $new_version = sprintf(esc_html__('There is a new version of %s available.', 'gravityforms'), $title) . sprintf(' <a class="thickbox" title="%s" href="plugin-install.php?tab=plugin-information&plugin=%s&TB_iframe=true&width=640&height=808">', $title, $this->_slug) . sprintf(esc_html__('View version %s Details', 'gravityforms'), $version_info['version']) . '</a>. ';
             } else {
                 $new_version = '';
             }
             $message = $new_version . sprintf(esc_html__('%sRegister%s your copy of Gravity Forms to receive access to automatic upgrades and support. Need a license key? %sPurchase one now%s.', 'gravityforms'), '<a href="admin.php?page=gf_settings">', '</a>', '<a href="http://www.gravityforms.com">', '</a>') . '</div></td>';
             GFAddOn::display_plugin_message($message);
         }
     }
 }
Example #20
0
 public static function load()
 {
     if (!method_exists('GFForms', 'include_feed_addon_framework')) {
         return;
     }
     if (!class_exists('Gravity_Flow_EDD_SL_Plugin_Updater')) {
         include dirname(__FILE__) . '/includes/EDD_SL_Plugin_Updater.php';
     }
     if (!class_exists('Gravity_Flow_API')) {
         include dirname(__FILE__) . '/includes/class-api.php';
     }
     if (!class_exists('Gravity_Flow_Web_API')) {
         include dirname(__FILE__) . '/includes/class-web-api.php';
     }
     if (!class_exists('Gravity_Flow_Extension')) {
         include dirname(__FILE__) . '/includes/class-extension.php';
     }
     if (!class_exists('Gravity_Flow_Feed_Extension')) {
         include dirname(__FILE__) . '/includes/class-feed-extension.php';
     }
     if (!class_exists('Gravity_Flow_Assignee')) {
         include dirname(__FILE__) . '/includes/class-assignee.php';
     }
     require_once 'class-gravity-flow.php';
     require_once 'includes/models/class-activity.php';
     require_once 'includes/steps/class-step.php';
     require_once 'includes/steps/class-steps.php';
     foreach (glob(plugin_dir_path(__FILE__) . 'includes/steps/class-step-*.php') as $gravity_flow_filename) {
         require_once $gravity_flow_filename;
     }
     foreach (glob(plugin_dir_path(__FILE__) . 'includes/fields/class-field-*.php') as $gravity_flow_filename) {
         require_once $gravity_flow_filename;
     }
     GFAddOn::register('Gravity_Flow');
     do_action('gravityflow_loaded');
 }
Example #21
0
 public static function enqueue_form_scripts($form_id, $is_ajax = false)
 {
     require_once GFCommon::get_base_path() . '/form_display.php';
     $form = RGFormsModel::get_form_meta($form_id);
     GFFormDisplay::enqueue_form_scripts($form, $is_ajax);
     $addons = GFAddOn::get_registered_addons();
     foreach ($addons as $addon) {
         $a = call_user_func(array($addon, 'get_instance'));
         $a->enqueue_scripts($form, $is_ajax);
     }
 }
Example #22
0
 public function styles()
 {
     $styles = array(array("handle" => "gfwebap_settings", "src" => GFCommon::get_base_url() . "/includes/webapi/css/gfwebapi_settings.css", "version" => $this->_version, "deps" => array("thickbox"), "enqueue" => array(array("admin_page" => array("plugin_settings")))));
     return array_merge(parent::scripts(), $styles);
 }
 /**
  * Override this function to provide a list of scripts to be enqueued.
  * When overriding this function, be sure to call parent::scripts() to ensure the base class scripts are enqueued.
  * Following is an example of the array that is expected to be returned by this function:
  *<pre>
  * <code>
  *
  *    array(
  *        array(  "handle" => "maskedinput",
  *                "src" => GFCommon::get_base_url() . "/js/jquery.maskedinput-1.3.min.js",
  *                "version" => GFCommon::$version,
  *                "deps" => array("jquery"),
  *                "in_footer" => false,
  *
  *                //Determines where the script will be enqueued. The script will be enqueued if any of the conditions match
  *                "enqueue" => array(
  *                                    //admin_page - Specified one or more pages (known pages) where the script is supposed to be enqueued. When this setting is specified, scripts will only be enqueued in those pages.
  *                                    //To enqueue scripts in the front end (public website), simply don't define this setting
  *                                    array("admin_page" => array("form_settings", "plugin_settings") ),
  *
  *                                    //tab - Specifies a form settings or plugin settings tab in which the script is supposed to be enqueued. If none is specified, the script will be enqueued in any of the form settings or plugin_settings page
  *                                    array("tab" => "signature"),
  *
  *                                    //query - Specifies a set of query string ($_GET) values. If all specified query string values match the current requested page, the script will be enqueued
  *                                    array("query" => "page=gf_edit_forms&view=settings&id=_notempty_")
  *
  *                                    //post - Specifies a set of post ($_POST) values. If all specified posted values match the current request, the script will be enqueued
  *                                    array("post" => "posted_field=val")
  *
  *                                    )
  *            ),
  *        array(
  *            "handle" => "super_signature_script",
  *            "src" => $this->get_base_url() . "/super_signature/ss.js",
  *            "version" => $this->_version,
  *            "deps" => array("jquery"),
  *            "callback" => array($this, "localize_scripts"),
  *            "strings" => array(
  *                               // Accessible in JavaScript using the global variable "[script handle]_strings"
  *                               "stringKey1" => __("The string", "gravityforms"),
  *                               "stringKey2" => __("Another string.", "gravityforms")
  *                               )
  *            "enqueue" => array(
  *                                //field_types - Specifies one or more field types that requires this script. The script will only be enqueued if the current form has a field of any of the specified field types. Only applies when a current form is available.
  *                                array("field_types" => array("signature"))
  *                                )
  *        )
  *  );
  *
  * </code>
  * </pre>
  */
 protected function scripts()
 {
     return array(array('handle' => 'gform_form_admin', 'enqueue' => array(array("admin_page" => array("form_settings")))), array('handle' => 'gform_gravityforms', 'enqueue' => array(array("admin_page" => array("form_settings")))), array("handle" => "google_charts", "src" => "https://www.google.com/jsapi", "version" => GFCommon::$version, "enqueue" => array(array("admin_page" => array("results")))), array("handle" => "gaddon_results_js", "src" => GFAddOn::get_gfaddon_base_url() . "/js/gaddon_results.js", "version" => GFCommon::$version, "deps" => array('jquery', 'sack', 'jquery-ui-resizable', 'jquery-ui-datepicker', 'google_charts', 'gform_field_filter'), "callback" => array('GFResults', "localize_results_scripts"), "enqueue" => array(array("admin_page" => array("results")))), array('handle' => 'gaddon_repeater', 'src' => GFAddOn::get_gfaddon_base_url() . '/js/repeater.js', 'version' => GFCommon::$version, 'deps' => array('jquery'), 'enqueue' => array(array('admin_page' => array('form_settings')))));
 }
    public function settings($sections)
    {
        parent::settings($sections);
        ?>
		<input type="hidden" name="gf_feed_id" value="<?php 
        echo $this->get_current_feed_id();
        ?>
" />
		<?php 
    }
 public function scripts()
 {
     parent::scripts();
     return array(array("handle" => "gfdo-scripts", "src" => $this->get_base_url() . "/js/gfdo.js", "version" => GFCommon::$version, "enqueue" => array(array("admin_page" => array("form_settings")))));
 }
 public function scripts()
 {
     return array_merge(parent::scripts(), array(array('handle' => 'gravity_forms_section_tabs_main', 'src' => $this->get_base_url() . '/js/main.js', 'version' => $this->_version, 'deps' => array('jquery'), 'in_footer' => true, 'enqueue' => array(array('field_types' => array('section'))))));
 }
 public function has_deprecated_elements()
 {
     $deprecated = GFAddOn::get_all_deprecated_protected_methods(get_class($this));
     if (!empty($deprecated)) {
         return true;
     }
     return false;
 }
 public static function load()
 {
     require_once 'class-gf-helpscout.php';
     GFAddOn::register('GFHelpScout');
 }
Example #29
0
 protected function styles()
 {
     $my_styles = array(array("handle" => "gform_admin", "src" => GFCommon::get_base_url() . "/css/admin.css", "version" => GFCommon::$version, "enqueue" => array(array("query" => "page=" . $this->_slug))));
     return array_merge(parent::styles(), $my_styles);
 }
 public function pre_init()
 {
     parent::pre_init();
     add_action("init", array($this, "prepopulate_frontend"), 10, 2);
 }