Ticket #27981: 27981.2.diff
File 27981.2.diff, 6.1 KB (added by , 10 years ago) |
---|
-
src/wp-admin/css/customize-controls.css
143 143 margin: 0; 144 144 } 145 145 146 p.customize-section-description { 147 font-style: normal; 148 } 149 146 150 .customize-control { 147 151 width: 100%; 148 152 float: left; … … 182 186 margin-bottom: 5px; 183 187 } 184 188 189 .customize-control-description { 190 display: block; 191 font-style: italic; 192 line-height: 18px; 193 margin-bottom: 5px; 194 } 195 185 196 .customize-control-color .color-picker, 186 197 .customize-control-checkbox label, 187 198 .customize-control-upload div { … … 201 212 line-height: 22px; 202 213 } 203 214 215 .customize-control-radio .customize-control-title + .customize-control-description { 216 margin-top: 7px; 217 } 218 204 219 .customize-control-radio label { 205 220 line-height: 32px; 206 221 } -
src/wp-includes/class-wp-customize-control.php
54 54 public $label = ''; 55 55 56 56 /** 57 * @access public 58 * @var string 59 */ 60 public $description = ''; 61 62 /** 57 63 * @todo: Remove choices 58 64 * 59 65 * @access public … … 258 264 case 'text': 259 265 ?> 260 266 <label> 261 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> 267 <?php if ( ! empty( $this->label ) ) : ?> 268 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> 269 <?php endif; 270 if ( ! empty( $this->description ) ) : ?> 271 <span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span> 272 <?php endif; ?> 262 273 <input type="text" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->link(); ?> /> 263 274 </label> 264 275 <?php … … 268 279 <label> 269 280 <input type="checkbox" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->link(); checked( $this->value() ); ?> /> 270 281 <?php echo esc_html( $this->label ); ?> 282 <?php if ( ! empty( $this->description ) ) : ?> 283 <span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span> 284 <?php endif; ?> 271 285 </label> 272 286 <?php 273 287 break; … … 277 291 278 292 $name = '_customize-radio-' . $this->id; 279 293 280 ?> 281 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> 282 <?php 294 if ( ! empty( $this->label ) ) : ?> 295 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> 296 <?php endif; 297 if ( ! empty( $this->description ) ) : ?> 298 <span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span> 299 <?php endif; 300 283 301 foreach ( $this->choices as $value => $label ) : 284 302 ?> 285 303 <label> … … 295 313 296 314 ?> 297 315 <label> 298 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> 316 <?php if ( ! empty( $this->label ) ) : ?> 317 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> 318 <?php endif; 319 if ( ! empty( $this->description ) ) : ?> 320 <span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span> 321 <?php endif; ?> 322 299 323 <select <?php $this->link(); ?>> 300 324 <?php 301 325 foreach ( $this->choices as $value => $label ) … … 401 425 // The input's value gets set by JS. Don't fill it. 402 426 ?> 403 427 <label> 404 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> 428 <?php if ( ! empty( $this->label ) ) : ?> 429 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> 430 <?php endif; 431 if ( ! empty( $this->description ) ) : ?> 432 <span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span> 433 <?php endif; ?> 434 405 435 <div class="customize-control-content"> 406 436 <input class="color-picker-hex" type="text" maxlength="7" placeholder="<?php esc_attr_e( 'Hex Value' ); ?>"<?php echo $default_attr; ?> /> 407 437 </div> … … 458 488 public function render_content() { 459 489 ?> 460 490 <label> 461 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> 491 <?php if ( ! empty( $this->label ) ) : ?> 492 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> 493 <?php endif; 494 if ( ! empty( $this->description ) ) : ?> 495 <span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span> 496 <?php endif; ?> 462 497 <div> 463 498 <a href="#" class="button-secondary upload"><?php _e( 'Upload' ); ?></a> 464 499 <a href="#" class="remove"><?php _e( 'Remove' ); ?></a> … … 540 575 541 576 ?> 542 577 <div class="customize-image-picker"> 543 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> 578 <?php if ( ! empty( $this->label ) ) : ?> 579 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> 580 <?php endif; 581 if ( ! empty( $this->description ) ) : ?> 582 <span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span> 583 <?php endif; ?> 544 584 545 585 <div class="customize-control-content"> 546 586 <div class="dropdown preview-thumbnail" tabindex="0"> -
src/wp-includes/class-wp-customize-section.php
167 167 <h3 class="accordion-section-title" tabindex="0"><?php echo esc_html( $this->title ); ?></h3> 168 168 <ul class="accordion-section-content"> 169 169 <?php if ( ! empty( $this->description ) ) : ?> 170 <li><p class="description "><?php echo $this->description; ?></p></li>170 <li><p class="description customize-section-description"><?php echo $this->description; ?></p></li> 171 171 <?php endif; ?> 172 172 <?php 173 173 foreach ( $this->controls as $control )