本文整理汇总了PHP中GFAddOn类的典型用法代码示例。如果您正苦于以下问题:PHP GFAddOn类的具体用法?PHP GFAddOn怎么用?PHP GFAddOn使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了GFAddOn类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load
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');
}
开发者ID:madalinignisca,项目名称:wordpress-gravity-forms-event-tracking,代码行数:8,代码来源:gravity-forms-event-tracking.php
示例2: load
public static function load()
{
if (!method_exists('GFForms', 'include_payment_addon_framework')) {
return;
}
require_once 'class-gf-paypalpaymentspro.php';
GFAddOn::register('GFPayPalPaymentsPro');
}
示例3: load
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');
}
示例4: feed_settings_fields
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'))));
}
示例5: load
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');
}
示例6: rg_plugin_row
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);
}
}
}
示例7: load
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');
}
示例8: enqueue_form_scripts
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);
}
}
示例9: scripts
/**
* 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')))));
}
示例10: init
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);
}
示例11: KWSGFWebToLeadAddon
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();
}
}
示例12: init_frontend
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'));
}
示例13: init_frontend
/**
* Frontend initiates
*/
public function init_frontend()
{
parent::init_frontend();
// Start Session
if (!session_id()) {
session_start();
}
// Add Actions
$this->add_actions();
}
开发者ID:shanooooon,项目名称:save-between-pages-for-gravityforms,代码行数:13,代码来源:class-save-between-page-for-gravityforms-api.php
示例14: init
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);
}
示例15: init
/**
* 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);
}
}