WordPress at a glance
function is not described

WP_Customize_Color_Control::content_template() public WP 4.1.0

Render a JS template for the content of the color picker control.

{} It's a method of the class: WP_Customize_Color_Control{}

No Hooks.

Return

null. Nothing.

Usage

$WP_Customize_Color_Control = new WP_Customize_Color_Control();
$WP_Customize_Color_Control->content_template();

Changelog

Since 4.1.0 Introduced.

Code of WP_Customize_Color_Control::content_template() WP 5.7.2

<?php
public function content_template() {
	?>
	<# var defaultValue = '#RRGGBB', defaultValueAttr = '',
		isHueSlider = data.mode === 'hue';
	if ( data.defaultValue && _.isString( data.defaultValue ) && ! isHueSlider ) {
		if ( '#' !== data.defaultValue.substring( 0, 1 ) ) {
			defaultValue = '#' + data.defaultValue;
		} else {
			defaultValue = data.defaultValue;
		}
		defaultValueAttr = ' data-default-color=' + defaultValue; // Quotes added automatically.
	} #>
	<# if ( data.label ) { #>
		<span class="customize-control-title">{{{ data.label }}}</span>
	<# } #>
	<# if ( data.description ) { #>
		<span class="description customize-control-description">{{{ data.description }}}</span>
	<# } #>
	<div class="customize-control-content">
		<label><span class="screen-reader-text">{{{ data.label }}}</span>
		<# if ( isHueSlider ) { #>
			<input class="color-picker-hue" type="text" data-type="hue" />
		<# } else { #>
			<input class="color-picker-hex" type="text" maxlength="7" placeholder="{{ defaultValue }}" {{ defaultValueAttr }} />
		<# } #>
		</label>
	</div>
	<?php
}