equal
deleted
inserted
replaced
46 * @param WP_Customize_Manager $manager Customizer bootstrap instance. |
46 * @param WP_Customize_Manager $manager Customizer bootstrap instance. |
47 * @param string $id Control ID. |
47 * @param string $id Control ID. |
48 * @param array $args Optional. Arguments to override class property defaults. |
48 * @param array $args Optional. Arguments to override class property defaults. |
49 */ |
49 */ |
50 public function __construct( $manager, $id, $args = array() ) { |
50 public function __construct( $manager, $id, $args = array() ) { |
51 $this->statuses = array( '' => __('Default') ); |
51 $this->statuses = array( '' => __( 'Default' ) ); |
52 parent::__construct( $manager, $id, $args ); |
52 parent::__construct( $manager, $id, $args ); |
53 } |
53 } |
54 |
54 |
55 /** |
55 /** |
56 * Enqueue scripts/styles for the color picker. |
56 * Enqueue scripts/styles for the color picker. |
68 * @since 3.4.0 |
68 * @since 3.4.0 |
69 * @uses WP_Customize_Control::to_json() |
69 * @uses WP_Customize_Control::to_json() |
70 */ |
70 */ |
71 public function to_json() { |
71 public function to_json() { |
72 parent::to_json(); |
72 parent::to_json(); |
73 $this->json['statuses'] = $this->statuses; |
73 $this->json['statuses'] = $this->statuses; |
74 $this->json['defaultValue'] = $this->setting->default; |
74 $this->json['defaultValue'] = $this->setting->default; |
75 $this->json['mode'] = $this->mode; |
75 $this->json['mode'] = $this->mode; |
76 } |
76 } |
77 |
77 |
78 /** |
78 /** |
79 * Don't render the control content from PHP, as it's rendered via JS on load. |
79 * Don't render the control content from PHP, as it's rendered via JS on load. |
80 * |
80 * |
109 <label><span class="screen-reader-text">{{{ data.label }}}</span> |
109 <label><span class="screen-reader-text">{{{ data.label }}}</span> |
110 <# if ( isHueSlider ) { #> |
110 <# if ( isHueSlider ) { #> |
111 <input class="color-picker-hue" type="text" data-type="hue" /> |
111 <input class="color-picker-hue" type="text" data-type="hue" /> |
112 <# } else { #> |
112 <# } else { #> |
113 <input class="color-picker-hex" type="text" maxlength="7" placeholder="{{ defaultValue }}" {{ defaultValueAttr }} /> |
113 <input class="color-picker-hex" type="text" maxlength="7" placeholder="{{ defaultValue }}" {{ defaultValueAttr }} /> |
114 <# } #> |
114 <# } #> |
115 </label> |
115 </label> |
116 </div> |
116 </div> |
117 <?php |
117 <?php |
118 } |
118 } |
119 } |
119 } |