( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ), 'noFileSelected' => esc_html__( 'No File Selected', 'kirki' ), 'remove' => esc_html__( 'Remove', 'kirki' ), 'default' => esc_html__( 'Default', 'kirki' ), 'selectFile' => esc_html__( 'Select File', 'kirki' ), 'standardFonts' => esc_html__( 'Standard Fonts', 'kirki' ), 'googleFonts' => esc_html__( 'Google Fonts', 'kirki' ), 'defaultCSSValues' => esc_html__( 'CSS Defaults', 'kirki' ), 'defaultBrowserFamily' => esc_html__( 'Default Browser Font-Family', 'kirki' ), ) ); $suffix = str_replace( '.min', '', $suffix ); // Enqueue the style. wp_enqueue_style( 'kirki-styles', "{$kirki_url}controls/css/styles{$suffix}.css", array(), KIRKI_VERSION ); } /** * Refresh the parameters passed to the JavaScript via JSON. * * @see WP_Customize_Control::to_json() */ public function to_json() { // Get the basics from the parent class. parent::to_json(); // Default value. $this->json['default'] = $this->setting->default; if ( isset( $this->default ) ) { $this->json['default'] = $this->default; } // Required. $this->json['required'] = $this->required; // 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'] = ''; 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; } /** * 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(). * * @since 3.4.0 */ 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()}. * * @see WP_Customize_Control::print_template() * * @access protected */ protected function content_template() {} /** * Returns an array of translation strings. * * @access protected * @since 3.0.0 * @return array */ protected function l10n() { return array(); } }