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.

git-svn-id: https://develop.svn.wordpress.org/trunk@20966 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-05-30 21:58:27 +00:00
parent e04fa3900b
commit d8c375fd4e
2 changed files with 4 additions and 2 deletions

View File

@ -234,7 +234,8 @@ if ( get_background_image() ) {
</tr>
<?php endif; ?>
<?php if ( get_theme_support( 'custom-background', 'default-image' ) ) : ?>
<?php $default_image = get_theme_support( 'custom-background', 'default-image' ); ?>
<?php if ( $default_image && get_background_image() != $default_image ) : ?>
<tr valign="top">
<th scope="row"><?php _e('Restore Original Image'); ?></th>
<td>

View File

@ -637,7 +637,8 @@ var farbtastic;
</tr>
<?php endif;
if ( current_theme_supports( 'custom-header', 'default-image' ) ) : ?>
$default_image = get_theme_support( 'custom-header', 'default-image' );
if ( $default_image && get_header_image() != $default_image ) : ?>
<tr valign="top">
<th scope="row"><?php _e( 'Reset Image' ); ?></th>
<td>