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: http://core.svn.wordpress.org/trunk@20966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-05-30 21:58:27 +00:00
parent 3300b5fbfb
commit b545454ceb
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>