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(); }
/** * 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; }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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; }
/** * 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(); }
/** * 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 special characters in this field, all special characters have been removed.', 'redux-framework'); $this->value = $value; $this->current = $current; $this->validate(); }
/** * 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 provide a valid email for this option.', 'redux-framework'); $this->value = $value; $this->current = $current; $this->validate(); }
/** * 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']; } }
/** * 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 provide a comma separated list of numerical values for this option.', 'redux-framework'); $this->value = $value; $this->current = $current; $this->validate(); }
/** * 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(); }
/** * 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; }
/** * 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']); } }
/** * 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'; }
/** * 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']); } }
/** * 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]); } } }
/** * 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)); } }
/** * 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; }