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


PHP GFAddOn::__construct方法代码示例

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


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

示例1: __construct

 /**
  * We're not able to set the __construct() method to private because we're extending the GFAddon class, so
  * we fake it. When called using `new GravityView_Settings`, it will return get_instance() instead. We pass
  * 'get_instance' as a test string.
  *
  * @see get_instance()
  *
  * @param string $prevent_multiple_instances
  */
 public function __construct($prevent_multiple_instances = '')
 {
     if ($prevent_multiple_instances === 'get_instance') {
         return parent::__construct();
     }
     return self::get_instance();
 }
开发者ID:roarmoser,项目名称:gv1,代码行数:16,代码来源:class-settings.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     add_action('gform_after_submission', array($this, 'after_submission'), 10, 2);
     add_filter('gform_export_field_value', array($this, 'display_entries_field_value'), 10, 3);
     add_action('gform_polls_cron', array($this, 'wp_cron_task'));
 }
开发者ID:ryan2407,项目名称:Vision,代码行数:7,代码来源:class-gf-polls.php

示例3: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     $this->_path = self::addon_local_path();
     $this->plugin_path = plugin_dir_path(dirname(dirname(__FILE__)));
     parent::__construct();
     $this->init();
 }
开发者ID:arstropica,项目名称:gforms_tmp,代码行数:10,代码来源:class.gforms_tmp_addon.php

示例4: 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();
     }
 }
开发者ID:AgilData,项目名称:WordPress-Skeleton,代码行数:28,代码来源:loader.php

示例5: __construct

 public function __construct()
 {
     if (defined('DOING_CRON') && DOING_CRON) {
         add_action('gravityforms_results_cron_' . $this->_slug, array($this, 'results_cron'), 10, 3);
         return;
     }
     parent::__construct();
 }
开发者ID:tlandn,项目名称:akvo-web,代码行数:8,代码来源:webapi.php

示例6: __construct

 /**
  * Class constructor for setting up the add-on.
  *
  * @access private
  * @since 1.0.0
  * @see GFAddOn
  */
 public function __construct()
 {
     $this->_title = __('Gravity Forms Iframe Add-On', 'gravity-forms-iframe');
     $this->_short_title = __('Iframe', 'gravity-forms-iframe');
     $this->_version = '1.0.0';
     $this->_slug = 'gfiframe';
     $this->_path = 'gravity-forms-iframe/gravity-forms-iframe.php';
     $this->_full_path = dirname(dirname(__FILE__)) . '/gravity-forms-iframe.php';
     parent::__construct();
 }
开发者ID:jimi008,项目名称:gravity-forms-iframe,代码行数:17,代码来源:class-gfiframe-addon.php

示例7: __construct

 /**
  * Class constructor for setting up the add-on.
  *
  * @since 2.0.0
  * @see GFAddOn
  *
  * @param GravityFormsIframe_Plugin $plugin Main plugin instance.
  */
 public function __construct($plugin)
 {
     $this->plugin = $plugin;
     $this->_title = esc_html__('Gravity Forms Iframe Add-On', 'gravity-forms-iframe');
     $this->_short_title = esc_html__('Iframe', 'gravity-forms-iframe');
     $this->_version = '2.0.1';
     $this->_slug = 'gfiframe';
     $this->_path = $this->plugin->get_basename();
     $this->_full_path = $this->plugin->get_file();
     parent::__construct();
 }
开发者ID:cedaro,项目名称:gravity-forms-iframe,代码行数:19,代码来源:Addon.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     $this->plugin_settings = $this->get_plugin_settings();
     $this->user = isset($this->plugin_settings['solve_user']) ? $this->plugin_settings['solve_user'] : false;
     $this->token = isset($this->plugin_settings['solve_token']) ? $this->plugin_settings['solve_token'] : false;
     $this->email_to = isset($this->plugin_settings['email_to']) ? $this->plugin_settings['email_to'] : false;
     $this->email_from = isset($this->plugin_settings['email_from']) ? $this->plugin_settings['email_from'] : false;
     $this->email_cc = isset($this->plugin_settings['email_cc']) ? $this->plugin_settings['email_cc'] : false;
     $this->email_bcc = isset($this->plugin_settings['email_bcc']) ? $this->plugin_settings['email_bcc'] : false;
     $this->email_headers = array();
     /**
      * Set wp_mail headers
      */
     if ($this->email_from) {
         $this->email_headers[] = sprintf('From: %s', $this->email_from);
     }
     if ($this->email_cc) {
         $this->email_headers[] = sprintf('Cc: %s', $this->email_cc);
     }
     if ($this->email_bcc) {
         $this->email_headers[] = sprintf('Bcc: %s', $this->email_bcc);
     }
     if (!$this->user && !$this->token) {
         throw new Exception(sprintf('Solve user and token are required! <a href="%s">Update your Solve credentials</a>.', $this->get_plugin_settings_url()));
     } else {
         if (!$this->user) {
             throw new Exception(sprintf('Solve user is required! <a href="%s">Update your Solve credentials</a>.', $this->get_plugin_settings_url()));
         } else {
             if (!$this->token) {
                 throw new Exception(sprintf('Solve token is required! <a href="%s">Update your Solve credentials</a>.', $this->get_plugin_settings_url()));
             }
         }
     }
     $this->solveService = new Solve360Service($this->user, $this->token);
     if (!$this->solveService) {
         throw new Exception('Invalid Solve Credentials, failed to intitiate Solve gateway.');
     }
     add_action('gform_field_advanced_settings', array($this, 'gform_field_advanced_settings'), 10, 2);
     add_action('gform_editor_js', array($this, 'editor_script'));
     add_action('gform_tooltips', array($this, 'form_tooltips'));
 }
开发者ID:duanecilliers,项目名称:gravity-forms-solve-add-on,代码行数:42,代码来源:gravity-forms-solve-add-on.php

示例9: __construct

 public function __construct()
 {
     parent::__construct();
     // add our CSS class to forms with section tabs enabled
     add_filter('gform_pre_render', array($this, 'gform_pre_render'), 10, 3);
 }
开发者ID:andresglx,项目名称:gravity-forms-section-tabs,代码行数:6,代码来源:gravityforms-section-tabs.php

示例10: __construct

 public function __construct()
 {
     add_action('init', array($this, 'maybe_handle_settings_submission'), 1);
     parent::__construct();
 }
开发者ID:danielbachhuber,项目名称:marcgratch.com,代码行数:5,代码来源:debug.php


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