* @copyright Copyright (c) 2017 - 2017, Satish Gandham */ add_action( 'customize_register', 'helium_font_selection_control_register', 1 ); function helium_font_selection_control_register( $wp_customize ) { $wp_customize->register_control_type( 'Helium_Customize_Control_Font_Selection' ); class Helium_Customize_Control_Font_Selection extends WP_Customize_Control { public $type = 'he_font'; public function to_json() { parent::to_json(); if ( $this->value() ) { $this->json['value'] = $this->value(); } $defaults = array( 'weights' => array(), 'subsets' => array(), 'fontObject' => array( 'family' => '' ) ); $this->json['value'] = wp_parse_args( $this->value(), $defaults ); } public function content_template() { ?>