colors[2]; } /** * Refresh the parameters passed to the JavaScript via JSON. * * @see WP_Customize_Control::to_json() */ public function to_json() { parent::to_json(); $this->json['default'] = $this->setting->default; if ( isset( $this->default ) ) { $this->json['default'] = $this->default; } $this->json['value'] = $this->value(); foreach ( $this->choices as $key => $value ) { $this->json['choices'][ $key ] = $value['path']; $this->json['choices_titles'][ $key ] = $value['label']; } $this->json['link'] = $this->get_link(); $this->json['id'] = $this->id; $this->json['inputAttrs'] = ''; $this->json['labelStyle'] = ''; foreach ( $this->input_attrs as $attr => $value ) { if ( 'style' !== $attr ) { $this->json['inputAttrs'] .= $attr . '="' . esc_attr( $value ) . '" '; } else { $this->json['labelStyle'] = 'style="' . esc_attr( $value ) . '" '; } } } /** * Render the control's content. * * @see WP_Customize_Control::render_content() */ protected function render_content() {} }