l10n = Kirki_l10n::get_strings( $this->kirki_config ); } /** * Refresh the parameters passed to the JavaScript via JSON. * * @see WP_Customize_Control::to_json() */ public function to_json() { parent::to_json(); if ( isset( $this->default ) ) { $this->json['default'] = $this->default; } else { $this->json['default'] = $this->setting->default; } $this->json['js_vars'] = $this->js_vars; $this->json['output'] = $this->output; $this->json['value'] = $this->value(); $this->json['choices'] = $this->choices; $this->json['link'] = $this->get_link(); $this->json['tooltip'] = $this->tooltip; $this->json['id'] = $this->id; $this->json['l10n'] = $this->l10n; $this->json['kirkiConfig'] = $this->kirki_config; if ( 'user_meta' === $this->option_type ) { $this->json['value'] = get_user_meta( get_current_user_id(), $this->id, true ); } $this->json['inputAttrs'] = ''; foreach ( $this->input_attrs as $attr => $value ) { $this->json['inputAttrs'] .= $attr . '="' . esc_attr( $value ) . '" '; } } /** * Renders the control wrapper and calls $this->render_content() for the internals. */ protected function render() { $id = 'customize-control-' . str_replace( array( '[', ']' ), array( '-', '' ), $this->id ); $class = 'customize-control customize-control-kirki customize-control-' . $this->type; ?>