~canonical-sysadmins/wordpress/4.8

« back to all changes in this revision

Viewing changes to wp-includes/customize/class-wp-customize-color-control.php

  • Committer: Barry Price
  • Date: 2017-06-09 02:09:58 UTC
  • mfrom: (1.1.26 upstream)
  • Revision ID: barry.price@canonical.com-20170609020958-838whhwt2196f2vk
Merge WP4.8 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
         */
93
93
        public function content_template() {
94
94
                ?>
95
 
                <# var defaultValue = '',
 
95
                <# var defaultValue = '#RRGGBB', defaultValueAttr = '',
96
96
                        isHueSlider = data.mode === 'hue';
97
97
 
98
98
                if ( data.defaultValue && ! isHueSlider ) {
101
101
                        } else {
102
102
                                defaultValue = data.defaultValue;
103
103
                        }
104
 
                        defaultValue = ' data-default-color=' + defaultValue; // Quotes added automatically.
 
104
                        defaultValueAttr = ' data-default-color=' + defaultValue; // Quotes added automatically.
105
105
                } #>
106
106
                <label>
107
107
                        <# if ( data.label ) { #>
114
114
                                <# if ( isHueSlider ) { #>
115
115
                                        <input class="color-picker-hue" type="text" data-type="hue" />
116
116
                                <# } else { #>
117
 
                                        <input class="color-picker-hex" type="text" maxlength="7" placeholder="<?php esc_attr_e( 'Hex Value' ); ?>" {{ defaultValue }} />
 
117
                                        <input class="color-picker-hex" type="text" maxlength="7" placeholder="{{ defaultValue }}" {{ defaultValueAttr }} />
118
118
                                <# } #>
119
119
                        </div>
120
120
                </label>