WordPress.org

Make WordPress Core

Ticket #20763: 20763.2.diff

File 20763.2.diff, 1.1 KB (added by SergeyBiryukov, 3 years ago)
  • wp-admin/custom-background.php

     
    234234</tr> 
    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> 
    240241<td> 
  • wp-admin/custom-header.php

     
    637637</tr> 
    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> 
    643644<td>