Make WordPress Core


Ignore:
Timestamp:
03/22/2012 07:30:44 AM (13 years ago)
Author:
koopersmith
Message:

Theme Customizer: Only show uploader 'remove' links when there is an image to remove. see #19910.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-customize-setting.php

    r20260 r20261  
    399399                break;
    400400            case 'upload':
     401                $value = $this->value();
     402                $style = empty( $value ) ? 'style="display:none;"' : '';
    401403                ?>
    402404                <label>
     
    405407                        <input type="hidden" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->name(); ?> />
    406408                        <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>
    408410                    </div>
    409411                </label>
Note: See TracChangeset for help on using the changeset viewer.