- Timestamp:
- 10/25/2016 10:32:55 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/customize/class-wp-customize-color-control.php
r35389 r38931 27 27 */ 28 28 public $statuses; 29 30 /** 31 * @access public 32 * @var string 33 */ 34 public $mode = 'full'; 29 35 30 36 /** … … 63 69 $this->json['statuses'] = $this->statuses; 64 70 $this->json['defaultValue'] = $this->setting->default; 71 $this->json['mode'] = $this->mode; 65 72 } 66 73 … … 79 86 public function content_template() { 80 87 ?> 81 <# var defaultValue = ''; 82 if ( data.defaultValue ) { 88 <# var defaultValue = '', 89 isHueSlider = data.mode === 'hue'; 90 91 if ( data.defaultValue && ! isHueSlider ) { 83 92 if ( '#' !== data.defaultValue.substring( 0, 1 ) ) { 84 93 defaultValue = '#' + data.defaultValue; … … 96 105 <# } #> 97 106 <div class="customize-control-content"> 98 <input class="color-picker-hex" type="text" maxlength="7" placeholder="<?php esc_attr_e( 'Hex Value' ); ?>" {{ defaultValue }} /> 107 <# if ( isHueSlider ) { #> 108 <input class="color-picker-hue" type="text" data-type="hue" /> 109 <# } else { #> 110 <input class="color-picker-hex" type="text" maxlength="7" placeholder="<?php esc_attr_e( 'Hex Value' ); ?>" {{ defaultValue }} /> 111 <# } #> 99 112 </div> 100 113 </label>
Note: See TracChangeset
for help on using the changeset viewer.