json['sans'] = Typography::get_instance()->get_google_sans_fonts(); $this->json['serif'] = Typography::get_instance()->get_google_serif_fonts(); foreach ( $this->settings as $key => $setting ) { $this->json[ $key ] = [ 'link' => $this->get_link( $key ), 'value' => $this->value( $key ), ]; } $this->json['weight']['choices'] = Typography::get_instance()->get_font_weights(); $this->json['weight']['label'] = esc_html__( 'Font Weight', 'aamla' ); $this->json['weight']['desc'] = esc_html__( 'Strike through font weights are not available with currently selected google font.', 'aamla' ); $this->json['selectors']['label'] = esc_html__( 'Add css selectors', 'aamla' ); $this->json['selectors']['desc'] = esc_html__( 'Comma separated list of css selectors. Do not wrap selectors with single quotes.', 'aamla' ); } /** * Underscore JS template to handle the control's output. */ public function content_template() { ?> <# if ( data.label ) { #> {{ data.label }} <# } #> <# if ( data.description ) { #> {{{ data.description }}} <# } #>

<# if ( data.selectors.label ) { #> {{ data.selectors.label }} <# } #> <# if ( data.selectors.desc ) { #> {{ data.selectors.desc }} <# } #>
<# if ( data.weight.label ) { #> {{ data.weight.label }} <# } #> <# if ( data.weight.desc ) { #> {{ data.weight.desc }} <# } #>