default ) ) { $this->json['default'] = $this->default; } else { $this->json['default'] = $this->setting->default; } $this->json['value'] = $this->value(); if( $this->svg == true ){ foreach ( $this->choices as $key => $value ) { $this->json['choices'][ $key ] = $value['path']; $this->json['choices_titles'][ $key ] = $value['label']; } }else{ $this->json['choices'] = $this->choices; } $this->json['link'] = $this->get_link(); $this->json['id'] = $this->id; $this->json['tooltip'] = $this->tooltip; $this->json['svg'] = $this->svg; $this->json['class'] = $this->class; $this->json['inputAttrs'] = ''; foreach ( $this->input_attrs as $attr => $value ) { $this->json['inputAttrs'] .= $attr . '="' . esc_attr( $value ) . '" '; } } public function enqueue() { wp_enqueue_style( 'best-shop-radio-image', get_template_directory_uri() . '/inc/controlset/radioimg/radio-image.css', null ); wp_enqueue_script( 'best-shop-radio-image', get_template_directory_uri() . '/inc/controlset/radioimg/radio-image.js', array( 'jquery' ), false, true ); //for radio-image } protected function content_template() { ?> <# if ( data.tooltip ) { #> <# } #>