Пример #1
0
 /**
  * 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)
 {
     $redux_ver = ReduxFramework::$_version;
     // Set parent object
     $this->parent = $parent;
     // Set extension dir
     if (empty($this->extension_dir)) {
         $this->extension_dir = trailingslashit(str_replace('\\', '/', dirname(__FILE__)));
     }
     // Set field name
     $this->field_name = 'repeater';
     // Set instance
     self::$theInstance = $this;
     // Adds the local field
     add_filter('redux/' . $this->parent->args['opt_name'] . '/field/class/' . $this->field_name, array(&$this, 'overload_field_path'));
 }
Пример #2
0
 /**
  * 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 = ReduxFramework_extension_repeater::getInstance();
     // Set up min files for dev_mode = false.
     $min = Redux_Functions::isMin();
     wp_enqueue_script('redux-field-repeater-js', $this->extension_url . 'field_repeater' . $min . '.js', array('jquery', 'jquery-ui-core', 'jquery-ui-accordion', 'wp-color-picker'), time(), true);
     wp_enqueue_style('redux-field-repeater-css', $this->extension_url . 'field_repeater.css', time(), true);
 }