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


PHP ReduxFramework::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($_sections = array(), $args = array(), $widget = null)
 {
     $args['dev_mode'] = false;
     $args['global_variable'] = false;
     if ($widget != null) {
         $this->widget = $widget;
         $sections[] = array('title' => '', 'fields' => $_sections);
         add_filter('redux-support-group', array($this, 'field_support_group'), 1, 3);
     } else {
         $this->widget = null;
         $sections = $_sections;
     }
     parent::__construct($sections, $args, $extra_tabs = array());
     //check here if the field is availabe in ReduxPageBuilder fields folder
     //otherwise load it from ReduxFramework fields directory
     //remove_filter('redux-typeclass-load', 'add_extended_fields');
     //add_filter('redux-typeclass-load' , array($this,'fields_dir'));
     add_filter('redux/' . $args['opt_name'] . '/field/class/linkpicker', array($this, 'fields_dir'));
     //add_filter('redux-field-'.$this->args['opt_name'] , array($this,'field_support_widget'),10,2);
     add_filter('redux/field/' . $this->args['opt_name'] . '/render/after', array($this, 'field_support_widget'), 10, 2);
     // Set option with defaults
     $this->_set_default_options();
     // Options page
     $this->_options_page();
     // Register setting
     $this->_register_settings();
 }
开发者ID:tharindulucky,项目名称:premium-demo,代码行数:27,代码来源:redux.php

示例2: __construct

 /**
  * Field Constructor.
  *
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  *
  * @since       1.0.0
  * @access      public
  * @return      void
  */
 public function __construct($field = array(), $value = '', $parent)
 {
     parent::__construct($parent->sections, $parent->args);
     $this->field = $field;
     $this->value = $value;
     $this->parent = $parent;
 }
开发者ID:nhatnam1102,项目名称:wp-content,代码行数:16,代码来源:field_group.php

示例3: array

 /**
  * Field Constructor.
  *
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  *
  * @since ReduxFramework 3.0.0
  */
 function __construct($field = array(), $value = '', $parent)
 {
     parent::__construct($parent->sections, $parent->args);
     $this->field = $field;
     $this->value = $value;
     //$this->render();
 }
开发者ID:Bitcoinsulting,项目名称:website-ads,代码行数:14,代码来源:field_spinner.php

示例4:

 /**
  * Field Constructor.
  *
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  *
  * @since ReduxFramework 1.0.0
  */
 function __construct($field, $value, $current)
 {
     parent::__construct();
     $this->field = $field;
     $this->value = $value;
     $this->current = $current;
     $this->validate();
 }
开发者ID:neocreo,项目名称:brew,代码行数:15,代码来源:validation_html.php

示例5: array

 /**
  * Field Constructor.
  *
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  *
  * @since ReduxFramework 1.0.0
  */
 function __construct($field = array(), $value = '', $parent)
 {
     parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
     $this->field = $field;
     $this->value = $value;
     $this->googleAPIKey = $parent->args['google_api_key'];
     //$this->render();
 }
开发者ID:87surendra,项目名称:mbr,代码行数:15,代码来源:field_typography.php

示例6: __construct

 /**
  * Field Constructor.
  *
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  *
  * @since       1.0.0
  * @access      public
  * @return      void
  */
 public function __construct($field = array(), $value = '', $parent)
 {
     parent::__construct($parent->sections, $parent->args);
     $this->field = $field;
     $this->value = $value;
     $this->add_text = isset($this->field['add_text']) ? $this->field['add_text'] : __('Add More', 'redux-framework');
     $this->show_empty = isset($this->field['show_empty']) ? $this->field['show_empty'] : true;
 }
开发者ID:mdb-webdev,项目名称:ReduxCore,代码行数:17,代码来源:field_multi_text.php

示例7: isset

 /**
  * Field Constructor.
  *
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  *
  * @since ReduxFramework 1.0.0
  */
 function __construct($field, $value, $current)
 {
     parent::__construct();
     $this->field = $field;
     $this->field['msg'] = isset($this->field['msg']) ? $this->field['msg'] : __('You must not enter any HTML in this field, all HTML tags have been removed.', 'redux');
     $this->value = $value;
     $this->current = $current;
     $this->validate();
 }
开发者ID:dtekcth,项目名称:datateknologer.se,代码行数:16,代码来源:validation_no_html.php

示例8: array

 /**
  * Field Constructor.
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  * @since Redux_Options 1.0.0
  */
 function __construct($field = array(), $value = '', $parent)
 {
     parent::__construct($parent->sections, $parent->args);
     $this->field = $field;
     $this->value = $value;
     if (!is_array($this->value) && isset($this->field['options'])) {
         $this->value = $this->field['options'];
     }
 }
开发者ID:Bitcoinsulting,项目名称:website-ads,代码行数:14,代码来源:field_sorter.php

示例9: isset

 /**
  * Field Constructor.
  *
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  *
  * @since ReduxFramework 3.0.4
  */
 function __construct($field, $value, $current)
 {
     parent::__construct();
     $this->field = $field;
     $this->field['msg'] = isset($this->field['msg']) ? $this->field['msg'] : __('This field must be a valid color value.', 'redux-framework');
     $this->value = $value;
     $this->current = $current;
     $this->validate();
 }
开发者ID:neocreo,项目名称:brew,代码行数:16,代码来源:validation_color_rgba.php

示例10: __construct

 /**
  * Field Constructor.
  *
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  *
  * @since 		1.0.0
  * @access		public
  * @return		void
  */
 public function __construct($field = array(), $value = '', $parent)
 {
     parent::__construct($parent->sections, $parent->args);
     $this->field = $field;
     $this->value = $value;
     // Create defaults array
     $defaults = array('mode' => '', 'path' => '', 'remote_api_url' => '', 'version' => '', 'item_name' => '', 'author' => '', 'mode' => '');
     $this->field = wp_parse_args($this->field, $defaults);
     $defaults = array('license' => '', 'status' => '');
     $this->value = wp_parse_args($this->value, $defaults);
     $this->parent = $parent;
 }
开发者ID:neocreo,项目名称:brew,代码行数:21,代码来源:field_edd_license.php

示例11: __construct

 /**
  * Field Constructor.
  *
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  *
  * @since       1.0.0
  * @access      public
  * @return      void
  */
 public function __construct($field = array(), $value = '', $parent)
 {
     parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
     $this->field = $field;
     $this->value = $value;
     if (!empty($this->field['data']) && empty($this->field['options'])) {
         if (empty($this->field['args'])) {
             $this->field['args'] = array();
         }
         $this->field['options'] = $parent->get_wordpress_data($this->field['data'], $this->field['args']);
     }
 }
开发者ID:87surendra,项目名称:mbr,代码行数:21,代码来源:field_checkbox.php

示例12: __construct

 /**
  * Field Constructor.
  *
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  *
  * @since       1.0.0
  * @access      public
  * @return      void
  */
 public function __construct($field = array(), $value = '', $parent)
 {
     parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
     $this->field = $field;
     $this->value = $value;
     if (!empty($this->field['data']) && empty($this->field['options'])) {
         if (empty($this->field['args'])) {
             $this->field['args'] = array();
         }
         $this->field['options'] = $parent->get_wordpress_data($this->field['data'], $this->field['args']);
     }
     $this->field['data_class'] = isset($this->field['multi_layout']) ? 'data-' . $this->field['multi_layout'] : 'data-full';
 }
开发者ID:danielvdml,项目名称:quilqax,代码行数:22,代码来源:field_checkbox.php

示例13: array

 /**
  * Field Constructor.
  *
  * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
  *
  * @since ReduxFramework 1.0.0
  */
 function __construct($field = array(), $value = '', $parent)
 {
     parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
     $this->field = $field;
     $this->value = $value;
     //$this->render();
     if (!empty($this->field['data']) && empty($this->field['options'])) {
         if (empty($this->field['args'])) {
             $this->field['args'] = array();
         }
         if ($this->field['data'] == "elusive-icons" || $this->field['data'] == "elusive-icon" || $this->field['data'] == "elusive") {
             $icons_file = ReduxFramework::$_dir . 'inc/fields/select/fontawesome-icons.php';
             $icons_file = apply_filters('redux-font-icons-file', $icons_file);
             if (file_exists($icons_file)) {
                 require_once $icons_file;
             }
         }
         $this->field['options'] = $parent->get_wordpress_data($this->field['data'], $this->field['args']);
     }
 }
开发者ID:sissisnothere,项目名称:testWeb,代码行数:27,代码来源:field_select.php

示例14: __construct

 /**
  * Class Constructor. Defines the args for the extions class
  *
  * @since       1.0.0
  * @access      public
  * @param       array $sections Panel sections.
  * @param       array $args Class constructor arguments.
  * @param       array $extra_tabs Extra panel tabs.
  * @return      void
  */
 public function __construct($parent)
 {
     global $pagenow;
     if ($pagenow !== "customize.php" && $pagenow !== "admin-ajax.php") {
         return;
     }
     if ($parent->args['customizer'] === false) {
         return;
     }
     parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
     // Create defaults array
     $defaults = array();
     /*
       customize_controls_init
       customize_controls_enqueue_scripts
       customize_controls_print_styles
       customize_controls_print_scripts
       customize_controls_print_footer_scripts
     */
     add_action('admin_init', array(&$this, '_enqueue'), 30);
     // Customizer control scripts
     add_action('customize_register', array(&$this, '_register_customizer_controls'));
     // Create controls
     add_action('wp_enqueue_scripts', array(&$this, '_enqueue_previewer_css'));
     // Enqueue previewer css
     add_action('wp_enqueue_scripts', array(&$this, '_enqueue_previewer_js'));
     // Enqueue previewer javascript
     add_action('customize_save', array(&$this, 'customizer_save_before'));
     // Before save
     add_action('customize_save_after', array(&$this, 'customizer_save_after'));
     // After save
     if (empty($this->extension_dir)) {
         $this->extension_dir = trailingslashit(str_replace('\\', '/', dirname(__FILE__)));
         $this->extension_url = site_url(str_replace(trailingslashit(str_replace('\\', '/', ABSPATH)), '', $this->extension_dir));
         // Easier to read and less buggy way to find out correct url, but applicable
         // only if wp-content found. Othewise fall back to old URL detection code.
         if (preg_match("/wp-content\\/(.*)/", $this->extension_dir, $match)) {
             $this->extension_url = site_url('/wp-content/' . $match[1]);
         }
     }
 }
开发者ID:ottok,项目名称:ReduxCore,代码行数:51,代码来源:extension_customizer.php

示例15: __construct

 /**
  * Class Constructor. Defines the args for the extions class
  *
  * @since       1.0.0
  * @access      public
  * @param       array $sections Panel sections.
  * @param       array $args Class constructor arguments.
  * @param       array $extra_tabs Extra panel tabs.
  * @return      void
  */
 public function __construct($parent)
 {
     global $pagenow;
     if ($pagenow !== "customize.php" && $pagenow !== "admin-ajax.php") {
         return;
     }
     if ($parent->args['customizer'] === false) {
         return;
     }
     parent::__construct($parent->sections, $parent->args, $parent->extra_tabs);
     // Create defaults array
     $defaults = array();
     /*
       customize_controls_init
       customize_controls_enqueue_scripts
       customize_controls_print_styles
       customize_controls_print_scripts
       customize_controls_print_footer_scripts
     */
     add_action('admin_init', array(&$this, '_enqueue'), 30);
     // Customizer control scripts
     add_action('customize_register', array(&$this, '_register_customizer_controls'));
     // Create controls
     add_action('wp_enqueue_scripts', array(&$this, '_enqueue_previewer_css'));
     // Enqueue previewer css
     add_action('wp_enqueue_scripts', array(&$this, '_enqueue_previewer_js'));
     // Enqueue previewer javascript
     add_action('customize_save', array(&$this, 'customizer_save_before'));
     // Before save
     add_action('customize_save_after', array(&$this, 'customizer_save_after'));
     // After save
     if (empty($this->extension_dir)) {
         $this->extension_dir = trailingslashit(str_replace('\\', '/', dirname(__FILE__)));
         $this->extension_url = site_url(str_replace(trailingslashit(str_replace('\\', '/', ABSPATH)), '', $this->extension_dir));
     }
 }
开发者ID:mdb-webdev,项目名称:ReduxCore,代码行数:46,代码来源:extension_customizer.php


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