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:
parent
e9acc6d0b6
commit
fc796b8105
@ -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="">
|
||||
|
Loading…
Reference in New Issue
Block a user