Add reset background image to theme default. Props lancewillett. See #12186

git-svn-id: https://develop.svn.wordpress.org/trunk@14379 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2010-05-03 18:52:38 +00:00
parent e9acc6d0b6
commit fc796b8105
1 changed files with 12 additions and 1 deletions

View File

@ -87,7 +87,6 @@ class Custom_Background {
check_admin_referer('custom-background');
// @TODO: No UI entry point for this:
if ( isset($_POST['reset-background']) ) {
remove_theme_mods();
return;
@ -188,6 +187,18 @@ class Custom_Background {
</tr>
<?php endif; ?>
<?php if ( defined( 'BACKGROUND_IMAGE' ) ) : // Show only if a default background image exists ?>
<tr valign="top">
<th scope="row"><?php _e('Restore Original Image'); ?></th>
<td><p><?php _e('This will restore the original background image. You will not be able to restore any customizations.') ?></p>
<form method="post" action="">
<?php wp_nonce_field('custom-background'); ?>
<input type="submit" class="button" name="reset-background" value="<?php esc_attr_e('Restore Original Image'); ?>" />
</form>
</td>
</tr>
</form>
<?php endif; ?>
<tr valign="top">
<th scope="row"><?php _e('Upload Image'); ?></th>
<td><form enctype="multipart/form-data" id="uploadForm" method="POST" action="">