WordPress.org

Make WordPress Core

Changeset 20966


Ignore:
Timestamp:
05/30/12 21:58:27 (3 years ago)
Author:
nacin
Message:

When the current image is the default image, don't show buttons to restore to that image, for both custom headers and backgrounds. props mfields, SergeyBiryukov. fixes #20763.

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/custom-background.php

    r20901 r20966  
    235235<?php endif; ?> 
    236236 
    237 <?php if ( get_theme_support( 'custom-background', 'default-image' ) ) : ?> 
     237<?php $default_image = get_theme_support( 'custom-background', 'default-image' ); ?>  
     238<?php if ( $default_image && get_background_image() != $default_image ) : ?> 
    238239<tr valign="top"> 
    239240<th scope="row"><?php _e('Restore Original Image'); ?></th> 
  • trunk/wp-admin/custom-header.php

    r20944 r20966  
    638638    <?php endif; 
    639639 
    640     if ( current_theme_supports( 'custom-header', 'default-image' ) ) : ?> 
     640    $default_image = get_theme_support( 'custom-header', 'default-image' ); 
     641    if ( $default_image && get_header_image() != $default_image ) : ?> 
    641642<tr valign="top"> 
    642643<th scope="row"><?php _e( 'Reset Image' ); ?></th> 
Note: See TracChangeset for help on using the changeset viewer.