/** * Class Constructor. Defines the args for the extions class * * @since 1.0.0 * @access public * * @param array $parent Parent settings. * * @return void */ public function __construct($parent) { $avadaredux_ver = AvadaReduxFramework::$_version; // Set parent object $this->parent = $parent; // Set extension dir if (empty($this->extension_dir)) { $this->extension_dir = trailingslashit(str_replace('\\', '/', dirname(__FILE__))); } // Set instance self::$theInstance = $this; // Adds the local field add_filter('avadaredux/' . $this->parent->args['opt_name'] . '/field/class/' . $this->field_name, array(&$this, 'overload_field_path')); }
/** * Enqueue Function. * If this field requires any scripts, or css define this function and register/enqueue the scripts/css * * @since 1.0.0 * @access public * @return void */ public function enqueue() { $extension = AvadaReduxFramework_extension_repeater::getInstance(); // Set up min files for dev_mode = false. $min = AvadaRedux_Functions::isMin(); wp_enqueue_script('avadaredux-field-repeater-js', apply_filters("avadaredux/repeater/{$this->parent->args['opt_name']}/enqueue/avadaredux-field-repeater-js", $this->extension_url . 'field_repeater' . $min . '.js'), array('jquery', 'jquery-ui-core', 'jquery-ui-accordion', 'jquery-ui-sortable', 'wp-color-picker'), time(), true); wp_enqueue_style('avadaredux-field-repeater-css', apply_filters("avadaredux/repeater/{$this->parent->args['opt_name']}/enqueue/avadaredux-field-repeater-css", $this->extension_url . 'field_repeater.css'), array(), time(), 'all'); }