Ticket #42078: 42078.debug.diff
File 42078.debug.diff, 3.1 KB (added by , 7 years ago) |
---|
-
src/wp-admin/js/color-picker.js
42 42 el = self.element, 43 43 color; 44 44 45 el.hide(); 45 // el.hide(); 46 self.pickerContainer = $( _after ).insertBefore( $( el ) ); 46 47 47 48 // Set the saturation to the maximum level. 48 49 color = 'hsl(' + el.val() + ', 100, 50)'; … … 53 54 type: 'hue', 54 55 hide: false, 55 56 color: color, 57 target: self.pickerContainer, 56 58 /** 57 59 * @summary Handles the onChange event if one has been defined in the options. 58 60 * -
src/wp-content/themes/twentyseventeen/inc/customizer.php
66 66 $wp_customize->add_control( 67 67 new WP_Customize_Color_Control( 68 68 $wp_customize, 'colorscheme_hue', array( 69 'label' => __( 'Hue', 'twentyseventeen' ), 69 70 'mode' => 'hue', 70 71 'section' => 'colors', 71 72 'priority' => 6, -
src/wp-includes/customize/class-wp-customize-color-control.php
89 89 */ 90 90 public function content_template() { 91 91 ?> 92 <# var defaultValue = '#RRGGBB', defaultValueAttr = '', 92 <# 93 var defaultValue = '#RRGGBB', 94 defaultValueAttr = '', 95 inputId = _.uniqueId( 'customize-color-control-input-' ), 93 96 isHueSlider = data.mode === 'hue'; 97 94 98 if ( data.defaultValue && _.isString( data.defaultValue ) && ! isHueSlider ) { 95 99 if ( '#' !== data.defaultValue.substring( 0, 1 ) ) { 96 100 defaultValue = '#' + data.defaultValue; … … 98 102 defaultValue = data.defaultValue; 99 103 } 100 104 defaultValueAttr = ' data-default-color=' + defaultValue; // Quotes added automatically. 101 } #> 105 } 106 #> 102 107 <# if ( data.label ) { #> 103 < span class="customize-control-title">{{{ data.label }}}</span>108 <label for="{{ inputId }}" class="customize-control-title">{{{ data.label }}}</label> 104 109 <# } #> 105 110 <# if ( data.description ) { #> 106 111 <span class="description customize-control-description">{{{ data.description }}}</span> 107 112 <# } #> 108 113 <div class="customize-control-content"> 109 <label><span class="screen-reader-text">{{{ data.label }}}</span>110 114 <# if ( isHueSlider ) { #> 111 <input class="color-picker-hue" type="text" data-type="hue" />115 <input id="{{ inputId }}" class="color-picker-hue" type="number" min="1" max="359" step="1" data-type="hue" /> 112 116 <# } else { #> 113 <input class="color-picker-hex" type="text" maxlength="7" placeholder="{{ defaultValue }}" {{ defaultValueAttr }} />117 <input id="{{ inputId }}" class="color-picker-hex" type="text" maxlength="7" placeholder="{{ defaultValue }}" {{ defaultValueAttr }} /> 114 118 <# } #> 115 </label>116 119 </div> 117 120 <?php 118 121 }