choices as $key=>$val){ $this->json['choices'][] = array( 'key' => $key, 'label' => $val['label'], 'image' => $val['image'] ); } $this->json['id'] = $this->id; $this->json['value'] = $this->value(); $this->json['link'] = $this->get_link(); } /** * Render a JS template for the content of the color picker control. * * @since 4.1.0 */ public function content_template() { ?> <# //console.log(data); #> <# if(undefined !== data.choices){ #> <# var radioName = '_customize-radio-' + data.id; #> <# if(data.label){ #> {{{ data.label }}} <# } #> <# if(data.description){ #> {{{ data.description }}} <# } #>