custom_class = esc_attr( $args['custom_class'] ); } } /** * Add custom parameters to pass to the JS via JSON. * * @since 1.1.40 * @access public * @return array */ public function json() { $json = parent::json(); $json['choices'] = $this->choices; $json['link'] = $this->get_link(); $json['value'] = (array) $this->value(); $json['id'] = $this->id; $json['custom_class'] = $this->custom_class; return $json; } /** * Underscore JS template to handle the control's output. * * @since 1.1.40 * @access public * @return void */ public function content_template() { ?> <# if ( ! data.choices ) { return; } #>