Completed
Push — develop ( a36835...64defb )
by Aristeides
03:02
created

Kirki_Control_Typography::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 3
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * Customizer Control: typography.
4
 *
5
 * @package     Kirki
6
 * @subpackage  Controls
7
 * @copyright   Copyright (c) 2017, Aristeides Stathopoulos
8
 * @license     http://opensource.org/licenses/https://opensource.org/licenses/MIT
9
 * @since       2.0
10
 */
11
12
// Exit if accessed directly.
13
if ( ! defined( 'ABSPATH' ) ) {
14
	exit;
15
}
16
17
/**
18
 * Typography control.
19
 */
20
class Kirki_Control_Typography extends WP_Customize_Control {
21
22
	/**
23
	 * The control type.
24
	 *
25
	 * @access public
26
	 * @var string
27
	 */
28
	public $type = 'kirki-typography';
29
30
	/**
31
	 * Used to automatically generate all CSS output.
32
	 *
33
	 * @access public
34
	 * @var array
35
	 */
36
	public $output = array();
37
38
	/**
39
	 * Data type
40
	 *
41
	 * @access public
42
	 * @var string
43
	 */
44
	public $option_type = 'theme_mod';
45
46
	/**
47
	 * The kirki_config we're using for this control
48
	 *
49
	 * @access public
50
	 * @var string
51
	 */
52
	public $kirki_config = 'global';
53
54
	/**
55
	 * Constructor.
56
	 *
57
	 * Supplied `$args` override class property defaults.
58
	 *
59
	 * If `$args['settings']` is not defined, use the $id as the setting ID.
60
	 *
61
	 * @since 3.0.0
62
	 *
63
	 * @param WP_Customize_Manager $manager Customizer bootstrap instance.
64
	 * @param string               $id      Control ID.
65
	 * @param array                $args    {
66
	 *     Optional. Arguments to override class property defaults.
67
	 *
68
	 *     @type int                  $instance_number Order in which this instance was created in relation
69
	 *                                                 to other instances.
70
	 *     @type WP_Customize_Manager $manager         Customizer bootstrap instance.
71
	 *     @type string               $id              Control ID.
72
	 *     @type array                $settings        All settings tied to the control. If undefined, `$id` will
73
	 *                                                 be used.
74
	 *     @type string               $setting         The primary setting for the control (if there is one).
75
	 *                                                 Default 'default'.
76
	 *     @type int                  $priority        Order priority to load the control. Default 10.
77
	 *     @type string               $section         Section the control belongs to. Default empty.
78
	 *     @type string               $label           Label for the control. Default empty.
79
	 *     @type string               $description     Description for the control. Default empty.
80
	 *     @type array                $choices         List of choices for 'radio' or 'select' type controls, where
81
	 *                                                 values are the keys, and labels are the values.
82
	 *                                                 Default empty array.
83
	 *     @type array                $input_attrs     List of custom input attributes for control output, where
84
	 *                                                 attribute names are the keys and values are the values. Not
85
	 *                                                 used for 'checkbox', 'radio', 'select', 'textarea', or
86
	 *                                                 'dropdown-pages' control types. Default empty array.
87
	 *     @type array                $json            Deprecated. Use WP_Customize_Control::json() instead.
88
	 *     @type string               $type            Control type. Core controls include 'text', 'checkbox',
89
	 *                                                 'textarea', 'radio', 'select', and 'dropdown-pages'. Additional
90
	 *                                                 input types such as 'email', 'url', 'number', 'hidden', and
91
	 *                                                 'date' are supported implicitly. Default 'text'.
92
	 * }
93
	 */
94
	public function __construct( $manager, $id, $args = array() ) {
95
96
		parent::__construct( $manager, $id, $args );
97
		add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_scripts' ), 999 );
98
99
	}
100
101
	/**
102
	 * Enqueue control related scripts/styles.
103
	 *
104
	 * @access public
105
	 */
106
	public function enqueue_scripts() {
107
108
		wp_enqueue_script( 'select2', trailingslashit( Kirki::$url ) . 'assets/vendor/select2/js/select2.full.js', array( 'jquery' ), false, true );
109
		wp_enqueue_style( 'select2', trailingslashit( Kirki::$url ) . 'assets/vendor/select2/kirki.css', null );
110
		wp_enqueue_style( 'wp-color-picker' );
111
		wp_enqueue_script( 'wp-color-picker-alpha', trailingslashit( Kirki::$url ) . 'assets/vendor/wp-color-picker-alpha/wp-color-picker-alpha.js', array( 'wp-color-picker' ), '1.2', true );
112
		wp_enqueue_script( 'kirki-typography', trailingslashit( Kirki::$url ) . 'controls/typography/typography.js', array( 'jquery', 'customize-base', 'select2', 'wp-color-picker-alpha' ), false, true );
113
		$custom_fonts_array = ( isset( $this->choices['fonts'] ) && ( isset( $this->choices['fonts']['google'] ) || isset( $this->choices['fonts']['standard'] ) ) && ( ! empty( $this->choices['fonts']['google'] ) || ! empty( $this->choices['fonts']['standard'] ) ) );
114
		$localize_script_var_name = ( $custom_fonts_array ) ? 'kirkiFonts' . $this->id : 'kirkiAllFonts';
115
		wp_localize_script(
116
			'kirki-typography',
117
			$localize_script_var_name,
118
			array(
119
				'standard' => $this->get_standard_fonts(),
120
				'google'   => $this->get_google_fonts(),
121
			)
122
		);
123
124
		wp_enqueue_style( 'kirki-typography-css', trailingslashit( Kirki::$url ) . 'controls/typography/typography.css', null );
125
126
	}
127
128
	/**
129
	 * Refresh the parameters passed to the JavaScript via JSON.
130
	 *
131
	 * @see WP_Customize_Control::to_json()
132
	 */
133
	public function to_json() {
134
		parent::to_json();
135
136
		$this->json['default'] = $this->setting->default;
137
		if ( isset( $this->default ) ) {
138
			$this->json['default'] = $this->default;
139
		}
140
		$this->json['output']  = $this->output;
141
		$this->json['value']   = $this->value();
142
		$this->json['value']   = $this->get_value_complete( $this->json['value'] );
143
		$this->json['choices'] = $this->choices;
144
		$this->json['link']    = $this->get_link();
145
		$this->json['id']      = $this->id;
146
		$this->json['l10n']    = $this->l10n();
147
148
		$this->json['inputAttrs'] = '';
149
		foreach ( $this->input_attrs as $attr => $value ) {
150
			$this->json['inputAttrs'] .= $attr . '="' . esc_attr( $value ) . '" ';
151
		}
152
153
		$defaults = array(
154
			'font-family'    => false,
155
			'font-size'      => false,
156
			'variant'        => false,
157
			'line-height'    => false,
158
			'letter-spacing' => false,
159
			'word-spacing'   => false,
160
			'color'          => false,
161
			'text-align'     => false,
162
		);
163
		$this->json['default'] = wp_parse_args( $this->json['default'], $defaults );
164
		$this->json['show_variants'] = ( true === Kirki_Fonts_Google::$force_load_all_variants ) ? false : true;
165
		$this->json['show_subsets']  = ( true === Kirki_Fonts_Google::$force_load_all_subsets ) ? false : true;
166
		$this->json['languages']     = Kirki_Fonts::get_google_font_subsets();
167
	}
168
169
	/**
170
	 * An Underscore (JS) template for this control's content (but not its container).
171
	 *
172
	 * Class variables for this control class are available in the `data` JS object;
173
	 * export custom variables by overriding {@see WP_Customize_Control::to_json()}.
174
	 *
175
	 * @see WP_Customize_Control::print_template()
176
	 *
177
	 * @access protected
178
	 */
179
	protected function content_template() {
180
		?>
181
		<label class="customizer-text">
182
			<# if ( data.label ) { #>
183
				<span class="customize-control-title">{{{ data.label }}}</span>
184
			<# } #>
185
			<# if ( data.description ) { #>
186
				<span class="description customize-control-description">{{{ data.description }}}</span>
187
			<# } #>
188
		</label>
189
190
		<div class="wrapper">
191
192
			<# if ( data.default['font-family'] ) { #>
193
				<# if ( '' == data.value['font-family'] ) { data.value['font-family'] = data.default['font-family']; } #>
194
				<# if ( data.choices['fonts'] ) { data.fonts = data.choices['fonts']; } #>
195
				<div class="font-family">
196
					<h5>{{ data.l10n['font-family'] }}</h5>
197
					<select {{{ data.inputAttrs }}} id="kirki-typography-font-family-{{{ data.id }}}" placeholder="{{ data.l10n['select-font-family'] }}"></select>
198
				</div>
199
				<# if ( ! _.isUndefined( data.choices['font-backup'] ) && true === data.choices['font-backup'] ) { #>
200
					<div class="font-backup hide-on-standard-fonts kirki-font-backup-wrapper">
201
						<h5>{{ data.l10n['font-backup'] }}</h5>
202
						<select {{{ data.inputAttrs }}} id="kirki-typography-font-backup-{{{ data.id }}}" placeholder="{{ data.l10n['select-font-family'] }}"></select>
203
					</div>
204
				<# } #>
205
				<# if ( true === data.show_variants || false !== data.default.variant ) { #>
206
					<div class="variant kirki-variant-wrapper">
207
						<h5>{{ data.l10n['variant'] }}</h5>
208
						<select {{{ data.inputAttrs }}} class="variant" id="kirki-typography-variant-{{{ data.id }}}"></select>
209
					</div>
210
				<# } #>
211
				<# if ( true === data.show_subsets ) { #>
212
					<div class="subsets hide-on-standard-fonts kirki-subsets-wrapper">
213
						<h5>{{ data.l10n['subsets'] }}</h5>
214
						<select {{{ data.inputAttrs }}} class="subset" id="kirki-typography-subsets-{{{ data.id }}}"<# if ( _.isUndefined( data.choices['disable-multiple-variants'] ) || false === data.choices['disable-multiple-variants'] ) { #> multiple<# } #>>
215
							<# _.each( data.value.subsets, function( subset ) { #>
216
								<option value="{{ subset }}" selected="selected">{{ data.languages[ subset ] }}</option>
217
							<# } ); #>
218
						</select>
219
					</div>
220
				<# } #>
221
			<# } #>
222
223
			<# if ( data.default['font-size'] ) { #>
224
				<div class="font-size">
225
					<h5>{{ data.l10n['font-size'] }}</h5>
226
					<input {{{ data.inputAttrs }}} type="text" value="{{ data.value['font-size'] }}"/>
227
				</div>
228
			<# } #>
229
230
			<# if ( data.default['line-height'] ) { #>
231
				<div class="line-height">
232
					<h5>{{ data.l10n['line-height'] }}</h5>
233
					<input {{{ data.inputAttrs }}} type="text" value="{{ data.value['line-height'] }}"/>
234
				</div>
235
			<# } #>
236
237
			<# if ( data.default['letter-spacing'] ) { #>
238
				<div class="letter-spacing">
239
					<h5>{{ data.l10n['letter-spacing'] }}</h5>
240
					<input {{{ data.inputAttrs }}} type="text" value="{{ data.value['letter-spacing'] }}"/>
241
				</div>
242
			<# } #>
243
244
			<# if ( data.default['word-spacing'] ) { #>
245
				<div class="word-spacing">
246
					<h5>{{ data.l10n['word-spacing'] }}</h5>
247
					<input {{{ data.inputAttrs }}} type="text" value="{{ data.value['word-spacing'] }}"/>
248
				</div>
249
			<# } #>
250
251
			<# if ( data.default['text-align'] ) { #>
252
				<div class="text-align">
253
					<h5>{{ data.l10n['text-align'] }}</h5>
254
					<input {{{ data.inputAttrs }}} type="radio" value="inherit" name="_customize-typography-text-align-radio-{{ data.id }}" id="{{ data.id }}-text-align-inherit" <# if ( data.value['text-align'] === 'inherit' ) { #> checked="checked"<# } #>>
255
						<label for="{{ data.id }}-text-align-inherit">
256
							<span class="dashicons dashicons-editor-removeformatting"></span>
257
							<span class="screen-reader-text">{{ data.l10n['inherit'] }}</span>
258
						</label>
259
					</input>
260
					<input {{{ data.inputAttrs }}} type="radio" value="left" name="_customize-typography-text-align-radio-{{ data.id }}" id="{{ data.id }}-text-align-left" <# if ( data.value['text-align'] === 'left' ) { #> checked="checked"<# } #>>
261
						<label for="{{ data.id }}-text-align-left">
262
							<span class="dashicons dashicons-editor-alignleft"></span>
263
							<span class="screen-reader-text">{{ data.l10n['left'] }}</span>
264
						</label>
265
					</input>
266
					<input {{{ data.inputAttrs }}} type="radio" value="center" name="_customize-typography-text-align-radio-{{ data.id }}" id="{{ data.id }}-text-align-center" <# if ( data.value['text-align'] === 'center' ) { #> checked="checked"<# } #>>
267
						<label for="{{ data.id }}-text-align-center">
268
							<span class="dashicons dashicons-editor-aligncenter"></span>
269
							<span class="screen-reader-text">{{ data.l10n['center'] }}</span>
270
						</label>
271
					</input>
272
					<input {{{ data.inputAttrs }}} type="radio" value="right" name="_customize-typography-text-align-radio-{{ data.id }}" id="{{ data.id }}-text-align-right" <# if ( data.value['text-align'] === 'right' ) { #> checked="checked"<# } #>>
273
						<label for="{{ data.id }}-text-align-right">
274
							<span class="dashicons dashicons-editor-alignright"></span>
275
							<span class="screen-reader-text">{{ data.l10n['right'] }}</span>
276
						</label>
277
					</input>
278
					<input {{{ data.inputAttrs }}} type="radio" value="justify" name="_customize-typography-text-align-radio-{{ data.id }}" id="{{ data.id }}-text-align-justify" <# if ( data.value['text-align'] === 'justify' ) { #> checked="checked"<# } #>>
279
						<label for="{{ data.id }}-text-align-justify">
280
							<span class="dashicons dashicons-editor-justify"></span>
281
							<span class="screen-reader-text">{{ data.l10n['justify'] }}</span>
282
						</label>
283
					</input>
284
				</div>
285
			<# } #>
286
287
			<# if ( data.default['text-transform'] ) { #>
288
				<div class="text-transform">
289
					<h5>{{ data.l10n['text-transform'] }}</h5>
290
					<select {{{ data.inputAttrs }}} id="kirki-typography-text-transform-{{{ data.id }}}">
291
						<option value="none"<# if ( 'none' === data.value['text-transform'] ) { #>selected<# } #>>{{ data.l10n['none'] }}</option>
292
						<option value="capitalize"<# if ( 'capitalize' === data.value['text-transform'] ) { #>selected<# } #>>{{ data.l10n['capitalize'] }}</option>
293
						<option value="uppercase"<# if ( 'uppercase' === data.value['text-transform'] ) { #>selected<# } #>>{{ data.l10n['uppercase'] }}</option>
294
						<option value="lowercase"<# if ( 'lowercase' === data.value['text-transform'] ) { #>selected<# } #>>{{ data.l10n['lowercase'] }}</option>
295
						<option value="initial"<# if ( 'initial' === data.value['text-transform'] ) { #>selected<# } #>>{{ data.l10n['initial'] }}</option>
296
						<option value="inherit"<# if ( 'inherit' === data.value['text-transform'] ) { #>selected<# } #>>{{ data.l10n['inherit'] }}</option>
297
					</select>
298
				</div>
299
			<# } #>
300
301
			<# if ( data.default['color'] ) { #>
302
				<div class="color">
303
					<h5>{{ data.l10n['color'] }}</h5>
304
					<input {{{ data.inputAttrs }}} type="text" data-palette="{{ data.palette }}" data-default-color="{{ data.default['color'] }}" value="{{ data.value['color'] }}" class="kirki-color-control color-picker" {{{ data.link }}} />
305
				</div>
306
			<# } #>
307
		</div>
308
		<#
309
		if ( ! _.isUndefined( data.value['font-family'] ) ) {
310
			data.value['font-family'] = data.value['font-family'].replace( /&quot;/g, '&#39' );
311
		}
312
		valueJSON = JSON.stringify( data.value ).replace( /'/g, '&#39' );
313
		#>
314
		<input class="typography-hidden-value" type="hidden" value='{{{ valueJSON }}}' {{{ data.link }}}>
315
		<?php
316
	}
317
318
	/**
319
	 * Returns an array of translation strings.
320
	 *
321
	 * @access protected
322
	 * @since 3.0.0
323
	 * @param string|false $config_id The string-ID.
324
	 * @return string
325
	 */
326
	protected function l10n( $config_id = false ) {
327
		$translation_strings = array(
328
			'inherit'        => esc_attr__( 'Inherit', 'kirki' ),
329
			'font-family'    => esc_attr__( 'Font Family', 'kirki' ),
330
			'font-backup'    => esc_attr__( 'Backup Font', 'kirki' ),
331
			'font-size'      => esc_attr__( 'Font Size', 'kirki' ),
332
			'line-height'    => esc_attr__( 'Line Height', 'kirki' ),
333
			'letter-spacing' => esc_attr__( 'Letter Spacing', 'kirki' ),
334
			'word-spacing'   => esc_attr__( 'Word Spacing', 'kirki' ),
335
			'left'           => esc_attr__( 'Left', 'kirki' ),
336
			'right'          => esc_attr__( 'Right', 'kirki' ),
337
			'center'         => esc_attr__( 'Center', 'kirki' ),
338
			'justify'        => esc_attr__( 'Justify', 'kirki' ),
339
			'color'          => esc_attr__( 'Color', 'kirki' ),
340
			'variant'        => esc_attr__( 'Variant', 'kirki' ),
341
			'subsets'        => esc_attr__( 'Subset', 'kirki' ),
342
			'text-align'     => esc_attr__( 'Text Align', 'kirki' ),
343
			'text-transform' => esc_attr__( 'Text Transform', 'kirki' ),
344
			'none'           => esc_attr__( 'None', 'kirki' ),
345
			'capitalize'     => esc_attr__( 'Capitalize', 'kirki' ),
346
			'uppercase'      => esc_attr__( 'Uppercase', 'kirki' ),
347
			'lowercase'      => esc_attr__( 'Lowercase', 'kirki' ),
348
			'initial'        => esc_attr__( 'Initial', 'kirki' ),
349
		);
350
		$translation_strings = apply_filters( "kirki/{$this->kirki_config}/l10n", $translation_strings );
351
		if ( false === $config_id ) {
352
			return $translation_strings;
353
		}
354
		return $translation_strings[ $config_id ];
355
	}
356
357
	/**
358
	 * Formats variants.
359
	 *
360
	 * @access protected
361
	 * @since 3.0.0
362
	 * @param array $variants The variants.
363
	 * @return array
364
	 */
365
	protected function format_variants_array( $variants ) {
366
367
		$all_variants = Kirki_Fonts::get_all_variants();
368
		$final_variants = array();
369
		foreach ( $variants as $variant ) {
370
			if ( is_string( $variant ) ) {
371
				$final_variants[] = array(
372
					'id'    => $variant,
373
					'label' => isset( $all_variants[ $variant ] ) ? $all_variants[ $variant ] : $variant,
374
				);
375
			} elseif ( is_array( $variant ) && isset( $variant['id'] ) && isset( $variant['label'] ) ) {
376
				$final_variants[] = $variant;
377
			}
378
		}
379
		return $final_variants;
380
	}
381
382
	/**
383
	 * Gets standard fonts properly formatted for our control.
384
	 *
385
	 * @access protected
386
	 * @since 3.0.0
387
	 * @return array
388
	 */
389
	protected function get_standard_fonts() {
390
		// Add fonts to our JS objects.
391
		$standard_fonts = Kirki_Fonts::get_standard_fonts();
392
393
		$std_user_keys = $this->choices['fonts']['standard'];
394
395
		$standard_fonts_final = array();
396
		$default_variants = $this->format_variants_array( array(
397
			'regular',
398
			'italic',
399
			'700',
400
			'700italic',
401
		) );
402
		foreach ( $standard_fonts as $key => $font ) {
403
			if ( ! empty( $std_user_keys ) && ! in_array( $key, $std_user_keys, true ) ) {
404
				continue;
405
			}
406
			$standard_fonts_final[] = array(
407
				'family'      => $font['stack'],
408
				'label'       => $font['label'],
409
				'subsets'     => array(),
410
				'is_standard' => true,
411
				'variants'    => ( isset( $font['variants'] ) ) ? $this->format_variants_array( $font['variants'] ) : $default_variants,
412
			);
413
		}
414
		return $standard_fonts_final;
415
	}
416
417
	/**
418
	 * Gets google fonts properly formatted for our control.
419
	 *
420
	 * @access protected
421
	 * @since 3.0.0
422
	 * @return array
423
	 */
424
	protected function get_google_fonts() {
425
		// Add fonts to our JS objects.
426
		$google_fonts = Kirki_Fonts::get_google_fonts();
427
		$all_variants = Kirki_Fonts::get_all_variants();
428
		$all_subsets  = Kirki_Fonts::get_google_font_subsets();
429
430
		$gf_user_keys = $this->choices['fonts']['google'];
431
432
		$google_fonts_final = array();
433
		foreach ( $google_fonts as $family => $args ) {
434
			if ( ! empty( $gf_user_keys ) && ! in_array( $family, $gf_user_keys, true ) ) {
435
				continue;
436
			}
437
438
			$label    = ( isset( $args['label'] ) ) ? $args['label'] : $family;
439
			$variants = ( isset( $args['variants'] ) ) ? $args['variants'] : array( 'regular', '700' );
440
			$subsets  = ( isset( $args['subsets'] ) ) ? $args['subsets'] : array();
441
442
			$available_variants = array();
443
			foreach ( $variants as $variant ) {
444
				if ( array_key_exists( $variant, $all_variants ) ) {
445
					$available_variants[] = array(
446
						'id' => $variant,
447
						'label' => $all_variants[ $variant ],
448
					);
449
				}
450
			}
451
452
			$available_subsets = array();
453
			foreach ( $subsets as $subset ) {
454
				if ( array_key_exists( $subset, $all_subsets ) ) {
455
					$available_subsets[] = array(
456
						'id' => $subset,
457
						'label' => $all_subsets[ $subset ],
458
					);
459
				}
460
			}
461
462
			$google_fonts_final[] = array(
463
				'family'       => $family,
464
				'label'        => $label,
465
				'variants'     => $available_variants,
466
				'subsets'      => $available_subsets,
467
			);
468
		} // End foreach().
469
		return $google_fonts_final;
470
	}
471
472
	/**
473
	 * Gets the complete value, properly compiled.
474
	 * Takes into account missing values depending on our options
475
	 * and fills-in the gaps.
476
	 *
477
	 * @access protected
478
	 * @since 3.0.0
479
	 * @param array $value The value.
480
	 * @return array       The value with any mods required.
481
	 */
482
	protected function get_value_complete( $value ) {
483
484
		// Get variant fron font-weight and font-style.
485
		if ( ! isset( $value['variant'] ) && isset( $value['font-weight'] ) ) {
486
			$value['variant'] = $value['font-weight'];
487
			if ( isset( $value['font-style'] ) && 'italic' === $value['font-style'] ) {
488
				$value['variant'] = ( '400' !== $value['font-weight'] || 400 !== $value['font-weight'] ) ? $value['variant'] . 'italic' : 'italic';
489
			}
490
		}
491
492
		// Use 'regular' instead of 400 for font-variant.
493
		$value['variant'] = ( 400 === $value['variant'] || '400' === $value['variant'] ) ? 'regular' : $value['variant'];
494
495
		// Get font-weight from variant.
496
		if ( ! isset( $value['font-weight'] ) && isset( $value['variant'] ) ) {
497
			$value['font-weight'] = filter_var( $value['variant'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION );
498
			$value['font-weight'] = absint( $value['font-weight'] );
499
500
			if ( 'regular' === $value['variant'] || 'italic' === $value['variant'] ) {
501
				$value['font-weight'] = 400;
502
			}
503
		}
504
505
		// Get font-style from variant.
506
		if ( ! isset( $value['font-style'] ) && isset( $value['variant'] ) ) {
507
			$value['font-style'] = ( false === strpos( $value['variant'], 'italic' ) ) ? 'normal' : 'italic';
508
		}
509
510
		return $value;
511
	}
512
513
	/**
514
	 * Render the control's content.
515
	 *
516
	 * @see WP_Customize_Control::render_content()
517
	 */
518
	protected function render_content() {}
519
}
520