当前位置: 首页>>代码示例>>PHP>>正文


PHP GFAddOn::init方法代码示例

本文整理汇总了PHP中GFAddOn::init方法的典型用法代码示例。如果您正苦于以下问题:PHP GFAddOn::init方法的具体用法?PHP GFAddOn::init怎么用?PHP GFAddOn::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GFAddOn的用法示例。


在下文中一共展示了GFAddOn::init方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 /**
  * Handles hooks and loading of language files.
  */
 public function init()
 {
     // Integration with the feed add-ons as of GF 1.9.15.12; for add-ons which don't override get_field_value().
     add_filter('gform_addon_field_value', array($this, 'addon_field_value'), 10, 5);
     // AWeber 2.3 and newer use the gform_addon_field_value hook, only use the gform_aweber_field_value hook with older versions.
     if (defined('GF_AWEBER_VERSION') && version_compare('GF_AWEBER_VERSION', '2.3', '<')) {
         add_filter('gform_aweber_field_value', array($this, 'legacy_addon_field_value'), 10, 4);
     }
     // Campaign Monitor Add-On integration
     add_filter('gform_campaignmonitor_field_value', array($this, 'legacy_addon_field_value'), 10, 4);
     // Mailchimp Add-On integration
     add_filter('gform_mailchimp_field_value', array($this, 'legacy_addon_field_value'), 10, 4);
     // Zapier Add-On integration
     add_filter('gform_zapier_field_value', array($this, 'zapier_field_value'), 10, 4);
     // merge tags
     add_filter('gform_replace_merge_tags', array($this, 'replace_merge_tags'), 10, 7);
     // add a special class to likert fields so we can identify them later
     add_action('gform_field_css_class', array($this, 'add_custom_class'), 10, 3);
     // display survey results on entry detail
     add_filter('gform_entry_field_value', array($this, 'entry_field_value'), 10, 4);
     // conditional logic filters
     add_filter('gform_entry_meta_conditional_logic_confirmations', array($this, 'conditional_logic_filters'), 10, 3);
     add_filter('gform_entry_meta_conditional_logic_notifications', array($this, 'conditional_logic_filters'), 10, 3);
     parent::init();
 }
开发者ID:GravityPDF,项目名称:gravityformssurvey,代码行数:28,代码来源:class-gf-survey.php

示例2: 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);
 }
开发者ID:kd5ytx,项目名称:Empirical-Wordpress,代码行数:25,代码来源:UseyourDrive_GravityForms.php

示例3: 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);
 }
开发者ID:coollog,项目名称:theboola,代码行数:12,代码来源:class-gravity-forms-personality-quiz-addon.php

示例4: 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);
     }
 }
开发者ID:arstropica,项目名称:gforms_tmp,代码行数:17,代码来源:class.gforms_tmp_addon.php

示例5: init

 public function init()
 {
     parent::init();
     $this->stickylist_localize();
     add_action("gform_field_standard_settings", array($this, "stickylist_field_settings"), 10, 2);
     add_shortcode('stickylist', array($this, 'stickylist_shortcode'));
     add_action("gform_editor_js", array($this, "editor_script"));
     add_filter("gform_tooltips", array($this, "add_stickylist_tooltips"));
     add_action("wp_enqueue_scripts", array($this, "register_plugin_styles"), 5);
     add_filter("gform_pre_render", array($this, "pre_entry_action"));
     add_action("gform_after_submission", array($this, "post_edit_entry"), 10, 2);
     $this->maybe_delete_entry();
     add_action("gform_notification_ui_settings", array($this, "stickylist_gform_notification_ui_settings"), 10, 3);
     add_action("gform_pre_notification_save", array($this, "stickylist_gform_pre_notification_save"), 10, 2);
     add_filter("gform_disable_notification", array($this, "stickylist_gform_disable_notification"), 10, 4);
     add_filter("gform_notification", array($this, "stickylist_modify_notification"), 10, 3);
     add_action("gform_confirmation_ui_settings", array($this, "stickylist_gform_confirmation_ui_settings"), 10, 3);
     add_action("gform_pre_confirmation_save", array($this, "stickylist_gform_pre_confirmation_save"), 10, 2);
     add_filter("gform_confirmation", array($this, "stickylist_gform_confirmation"), 10, 4);
     add_filter("gform_post_data", array($this, "stickylist_gform_post_data"), 10, 3);
     add_filter('gform_validation', array($this, "stickylist_validate_fileupload"));
 }
开发者ID:Ezyva2015,项目名称:SMSF-Academy-Wordpress,代码行数:22,代码来源:class-sticky-list.php

示例6: init

 /**
  * Handles hooks and loading of language files.
  */
 public function init()
 {
     /**
      * A filter to allow the modification of the indicator when a user gets an answer correct on a quiz (Eg adding a link to your own icon)
      */
     $this->_correct_indicator_url = apply_filters('gquiz_correct_indicator', $this->get_base_url() . '/images/tick.png');
     /**
      * A filter to allow the modification of the indicator when a user gets an answer wrong on a quiz (Eg adding a link to your own icon)
      */
     $this->_incorrect_indicator_url = apply_filters('gquiz_incorrect_indicator', $this->get_base_url() . '/images/cross.png');
     //------------------- both outside and inside admin context ------------------------
     // scripts
     add_action('gform_enqueue_scripts', array($this, 'enqueue_front_end_scripts'), 10, 2);
     // maybe shuffle fields
     add_filter('gform_form_tag', array($this, 'maybe_store_selected_field_ids'), 10, 2);
     add_filter('gform_pre_render', array($this, 'pre_render'));
     add_action('gform_pre_validation', array($this, 'pre_render'));
     // shuffle choices if configured
     add_filter('gform_field_content', array($this, 'render_quiz_field_content'), 10, 5);
     // merge tags
     add_filter('gform_replace_merge_tags', array($this, 'render_merge_tag'), 10, 7);
     // confirmation
     add_filter('gform_confirmation', array($this, 'display_confirmation'), 10, 4);
     // Integration with the feed add-ons as of GF 1.9.15.12; for add-ons which don't override get_field_value().
     add_filter('gform_addon_field_value', array($this, 'addon_field_value'), 10, 4);
     // AWeber 2.3 and newer use the gform_addon_field_value hook, only use the gform_aweber_field_value hook with older versions.
     if (defined('GF_AWEBER_VERSION') && version_compare(GF_AWEBER_VERSION, '2.3', '<')) {
         add_filter('gform_aweber_field_value', array($this, 'legacy_addon_field_value'), 10, 4);
     }
     // Mailchimp Add-On integration
     add_filter('gform_mailchimp_field_value', array($this, 'legacy_addon_field_value'), 10, 4);
     // Campaign Monitor Add-On integration
     add_filter('gform_campaignmonitor_field_value', array($this, 'legacy_addon_field_value'), 10, 4);
     // Zapier Add-On integration
     add_filter('gform_zapier_field_value', array($this, 'legacy_addon_field_value'), 10, 4);
     //------------------- admin but outside admin context ------------------------
     // display quiz results on entry footer
     add_action('gform_print_entry_footer', array($this, 'print_entry_footer'), 10, 2);
     // add a special class to quiz fields so we can identify them later
     add_action('gform_field_css_class', array($this, 'add_custom_class'), 10, 3);
     // display quiz results on entry detail & entry list
     add_filter('gform_entry_field_value', array($this, 'display_quiz_on_entry_detail'), 10, 4);
     // conditional logic filters
     add_filter('gform_entry_meta_conditional_logic_confirmations', array($this, 'conditional_logic_filters'), 10, 3);
     add_filter('gform_entry_meta_conditional_logic_notifications', array($this, 'conditional_logic_filters'), 10, 3);
     parent::init();
 }
开发者ID:GravityPDF,项目名称:gravityformsquiz,代码行数:50,代码来源:class-gf-quiz.php

示例7: init

 public function init()
 {
     parent::init();
     add_action('gform_after_submission', array($this, 'maybe_process_feed'), 10, 2);
 }
开发者ID:aiga-chicago,项目名称:chicago.aiga.org,代码行数:5,代码来源:class-gf-feed-addon.php

示例8: init

 /**
  * Handles hooks and loading of language files.
  */
 public function init()
 {
     // add a special class to poll fields so we can identify them later
     add_action('gform_field_css_class', array($this, 'add_custom_class'), 10, 3);
     if ($this->get_custom_cron_schedule()) {
         add_filter('cron_schedules', array($this, 'cron_add_custom_schedule'));
     }
     // add wp_cron job if it's not already scheduled
     if (!wp_next_scheduled('gform_polls_cron')) {
         wp_schedule_event(time(), $this->get_cron_recurrence(), 'gform_polls_cron');
     }
     add_filter('gform_shortcode_polls', array($this, 'poll_shortcode'), 10, 3);
     add_filter('gform_pre_render', array($this, 'pre_render'));
     // shuffle choices if configured
     add_filter('gform_field_content', array($this, 'render_poll_field_content'), 10, 5);
     add_action('gform_validation', array($this, 'form_validation'));
     // update the cache
     add_action('gform_entry_created', array($this, 'entry_created'), 10, 2);
     // maybe display results on confirmation
     add_filter('gform_confirmation', array($this, 'display_confirmation'), 10, 4);
     add_shortcode('gfpolls_total', array($this, 'poll_total_shortcode'));
     // merge tags
     add_filter('gform_replace_merge_tags', array($this, 'render_merge_tag'), 10, 7);
     add_filter('gform_entry_field_value', array($this, 'display_poll_on_entry_detail'), 10, 4);
     // Integration with the feed add-ons as of GF 1.9.15.12; for add-ons which don't override get_field_value().
     add_filter('gform_addon_field_value', array($this, 'addon_field_value'), 10, 5);
     // AWeber 2.3 and newer use the gform_addon_field_value hook, only use the gform_aweber_field_value hook with older versions.
     if (defined('GF_AWEBER_VERSION') && version_compare(GF_AWEBER_VERSION, '2.3', '<')) {
         add_filter('gform_aweber_field_value', array($this, 'display_entries_field_value'), 10, 4);
     }
     // Mailchimp Add-On integration
     add_filter('gform_mailchimp_field_value', array($this, 'display_entries_field_value'), 10, 4);
     // Campaign Monitor Add-On integration
     add_filter('gform_campaignmonitor_field_value', array($this, 'display_entries_field_value'), 10, 4);
     // Zapier Add-On integration
     add_filter('gform_zapier_field_value', array($this, 'display_entries_field_value'), 10, 4);
     parent::init();
 }
开发者ID:GravityPDF,项目名称:gravityformspolls,代码行数:41,代码来源:class-gf-polls.php

示例9: init

 public function init()
 {
     // add a special class to poll fields so we can identify them later
     add_action('gform_field_css_class', array($this, 'add_custom_class'), 10, 3);
     if ($this->get_custom_cron_schedule()) {
         add_filter('cron_schedules', array($this, 'cron_add_custom_schedule'));
     }
     // add wp_cron job if it's not already scheduled
     if (!wp_next_scheduled('gform_polls_cron')) {
         wp_schedule_event(time(), $this->get_cron_recurrence(), 'gform_polls_cron');
     }
     parent::init();
 }
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:13,代码来源:polls.php

示例10: init

 public function init()
 {
     //------------------- both outside and inside admin context ------------------------
     // render field
     add_filter('gform_field_input', array($this, 'get_survey_field_content'), 10, 5);
     // add a special class to likert fields so we can identify them later
     add_action('gform_field_css_class', array($this, 'add_custom_class'), 10, 3);
     // display survey results on entry detail
     add_filter('gform_entry_field_value', array($this, 'display_survey_fields_on_entry_detail'), 10, 4);
     // conditional logic filters
     add_filter('gform_entry_meta_conditional_logic_confirmations', array($this, 'conditional_logic_filters'), 10, 3);
     add_filter('gform_entry_meta_conditional_logic_notifications', array($this, 'conditional_logic_filters'), 10, 3);
     parent::init();
 }
开发者ID:qhuit,项目名称:dcosta,代码行数:14,代码来源:class-gf-survey.php

示例11: init

 public function init()
 {
     parent::init();
     // add tasks or filters here that you want to perform both in the backend and frontend and for ajax requests
 }
开发者ID:jjozwiak,项目名称:gravityforms-csv-schedule-export,代码行数:5,代码来源:scheduled-export.php

示例12: init

 public function init()
 {
     $this->_correct_indicator_url = apply_filters('gquiz_correct_indicator', $this->get_base_url() . '/images/tick.png');
     $this->_incorrect_indicator_url = apply_filters('gquiz_incorrect_indicator', $this->get_base_url() . '/images/cross.png');
     //------------------- both outside and inside admin context ------------------------
     // add a special class to quiz fields so we can identify them later
     add_action('gform_field_css_class', array($this, 'add_custom_class'), 10, 3);
     // display quiz results on entry detail & entry list
     add_filter('gform_entry_field_value', array($this, 'display_quiz_on_entry_detail'), 10, 4);
     // conditional logic filters
     add_filter('gform_entry_meta_conditional_logic_confirmations', array($this, 'conditional_logic_filters'), 10, 3);
     add_filter('gform_entry_meta_conditional_logic_notifications', array($this, 'conditional_logic_filters'), 10, 3);
     parent::init();
 }
开发者ID:amprog,项目名称:gravity-forms-quiz,代码行数:14,代码来源:class-gf-quiz.php

示例13: init

 public function init()
 {
     parent::init();
     wp_register_style('optionsStylesheet', plugins_url('css/options.css', __FILE__));
     wp_enqueue_style('optionsStylesheet');
 }
开发者ID:shaffiqr,项目名称:ubc-cart,代码行数:6,代码来源:class-gfaddon.php

示例14: init

 public function init()
 {
     parent::init();
     add_filter("gform_submit_button", array($this, "form_submit_button"), 10, 2);
 }
开发者ID:radon1284,项目名称:simpleaddon,代码行数:5,代码来源:simpleaddon.php

示例15: init

 /**
  * Handles hooks and loading of language files.
  */
 public function init()
 {
     parent::init();
     add_filter('gform_merge_tag_filter', array($this, 'merge_tag_filter'), 10, 5);
 }
开发者ID:wp-premium,项目名称:gravityformssignature,代码行数:8,代码来源:class-gf-signature.php


注:本文中的GFAddOn::init方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。