* @copyright Copyright (c) 2017 - 2018, Satish Gandham
*/
add_action( 'customize_register', 'helium_he_select_control_register', 1 );
function helium_he_select_control_register( $wp_customize ) {
$wp_customize->register_control_type( 'Helium_Customize_Control_Select' );
class Helium_Customize_Control_Select extends WP_Customize_Control {
public $type = 'he_select';
public function to_json() {
parent::to_json();
$this->json['choices'] = $this->choices;
$this->json['link'] = $this->get_link();
if ( $this->value() ) {
$this->json['value'] = $this->value();
}
}
public function content_template() {
?>
<# if ( data.description ) { #>
{{{ data.description }}}
<# } #>