register_control_type( 'Epsilon_Control_Color_Picker' ); } /** * Add custom parameters to pass to the JS via JSON. * * @since 1.2.0 * @access public */ public function json() { $json = parent::json(); $json['id'] = $this->id; $json['link'] = $this->get_link(); $json['value'] = $this->value(); $json['default'] = $this->setting->default; $json['mode'] = '' !== $this->mode ? $this->mode : 'hex'; $json['lite'] = $this->lite; return $json; } /** * @since 1.0.0 */ public function enqueue() { wp_enqueue_style( 'minicolors', EPSILON_URI . '/assets/vendors/minicolors/jquery.minicolors.css' ); wp_enqueue_script( 'minicolors', EPSILON_URI . '/assets/vendors/minicolors/jquery.minicolors.min.js', array( 'jquery' ), '1.2.0', true ); } /** * Display the control's content */ public function content_template() { //@formatter:off ?>