Changeset 20261
- Timestamp:
- 03/22/2012 07:30:44 AM (13 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-customize-setting.php
r20260 r20261 399 399 break; 400 400 case 'upload': 401 $value = $this->value(); 402 $style = empty( $value ) ? 'style="display:none;"' : ''; 401 403 ?> 402 404 <label> … … 405 407 <input type="hidden" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->name(); ?> /> 406 408 <a href="#" class="button-secondary upload"><?php _e( 'Upload' ); ?></a> 407 <a href="#" class="remove" ><?php _e( 'Remove' ); ?></a>409 <a href="#" class="remove" <?php echo $style; ?>><?php _e( 'Remove' ); ?></a> 408 410 </div> 409 411 </label> -
trunk/wp-includes/js/customize-controls.dev.js
r20260 r20261 84 84 }); 85 85 86 this.container.on( 'click', '.remove', function( event ) { 86 this.remover = this.container.find('.remove'); 87 this.remover.click( function( event ) { 87 88 control.set(''); 88 89 event.preventDefault(); 89 90 }); 91 92 this.bind( this.removerVisibility ); 93 }, 94 removerVisibility: function( on ) { 95 this.remover.toggle( !! on ); 90 96 } 91 97 });
Note: See TracChangeset
for help on using the changeset viewer.