Changeset 20278 for trunk/wp-includes/class-wp-customize-setting.php
- Timestamp:
- 03/24/2012 04:35:13 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-customize-setting.php
r20276 r20278 406 406 break; 407 407 case 'upload': 408 $value = $this->value();409 $style = empty( $value ) ? 'style="display:none;"' : '';410 408 ?> 411 409 <label> … … 414 412 <input type="hidden" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->name(); ?> /> 415 413 <a href="#" class="button-secondary upload"><?php _e( 'Upload' ); ?></a> 416 <a href="#" class="remove" <?php echo $style; ?>><?php _e( 'Remove' ); ?></a> 414 <a href="#" class="remove"><?php _e( 'Remove' ); ?></a> 415 </div> 416 </label> 417 <?php 418 break; 419 case 'image': 420 $value = $this->value(); 421 422 $image = $value; 423 if ( isset( $this->control_params['get_url'] ) ) 424 $image = call_user_func( $this->control_params['get_url'], $image ); 425 426 ?> 427 <label> 428 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> 429 <input type="hidden" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->name(); ?> /> 430 <div class="customize-image-picker"> 431 <div class="thumbnail"> 432 <?php if ( empty( $image ) ): ?> 433 <img style="display:none;" /> 434 <?php else: ?> 435 <img src="<?php echo esc_url( $image ); ?>" /> 436 <?php endif; ?> 437 </div> 438 <div class="actions"> 439 <a href="#" class="upload"><?php _e( 'Upload New' ); ?></a> 440 <a href="#" class="remove"><?php _e( 'Remove Image' ); ?></a> 441 </div> 417 442 </div> 418 443 </label>
Note: See TracChangeset
for help on using the changeset viewer.