/**
        * 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 ) {
            
            $this->parent = $parent;
            if ( empty( $this->extension_dir ) ) {
                $this->extension_dir = trailingslashit( str_replace( '\\', '/', dirname( __FILE__ ) ) );
            }
            $this->field_name = 'custom_field';

            self::$theInstance = $this;

            add_filter( 'redux/'.$this->parent->args['opt_name'].'/field/class/'.$this->field_name, array( &$this, 'overload_field_path' ) ); // Adds the local field

        }
Example #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_custom_field::getInstance();
     wp_enqueue_script('redux-field-icon-select-js', $this->extension_url . 'field_custom_field.js', array('jquery'), time(), true);
     wp_enqueue_style('redux-field-icon-select-css', $this->extension_url . 'field_custom_field.css', time(), true);
 }