json['default'] = $this->setting->default; if ( isset( $this->default ) ) { $this->json['default'] = $this->default; } // Output. $this->json['output'] = $this->output; // Value. $this->json['value'] = $this->value(); // Choices. $this->json['choices'] = $this->choices; // The link. $this->json['link'] = $this->get_link(); // The ID. $this->json['id'] = $this->id; // Translation strings. $this->json['l10n'] = $this->l10n(); // The ajaxurl in case we need it. $this->json['ajaxurl'] = admin_url( 'admin-ajax.php' ); // Input attributes. $this->json['inputAttrs'] = ''; if ( is_array( $this->input_attrs ) ) { foreach ( $this->input_attrs as $attr => $value ) { $this->json['inputAttrs'] .= $attr . '="' . esc_attr( $value ) . '" '; } } // The kirki-config. $this->json['kirkiConfig'] = $this->kirki_config; // The option-type. $this->json['kirkiOptionType'] = $this->option_type; // The option-name. $this->json['kirkiOptionName'] = $this->option_name; // The preset. $this->json['preset'] = $this->preset; // The CSS-Variables. $this->json['css-var'] = $this->css_vars; // Parent setting. $this->json['parent_setting'] = $this->parent_setting; // Wrapper Attributes. $this->json['wrapper_atts'] = $this->wrapper_atts; } /** * Render the control's content. * * Allows the content to be overridden without having to rewrite the wrapper in `$this::render()`. * Control content can alternately be rendered in JS. See WP_Customize_Control::print_template(). * * @access protected * @since 1.0 * @return void */ protected function render_content() {} /** * An Underscore (JS) template for this control's content (but not its container). * * Class variables for this control class are available in the `data` JS object; * export custom variables by overriding {@see WP_Customize_Control::to_json()}. * * @access protected * @since 1.0 * @see WP_Customize_Control::print_template() * @return void */ protected function content_template() {} /** * Returns an array of translation strings. * * @access protected * @since 3.0.0 * @return array */ protected function l10n() { return []; } }