Ticket #12186: restore-original.diff
File restore-original.diff, 1.2 KB (added by , 15 years ago) |
---|
-
custom-background.php
87 87 88 88 check_admin_referer('custom-background'); 89 89 90 // @TODO: No UI entry point for this:91 90 if ( isset($_POST['reset-background']) ) { 92 91 remove_theme_mods(); 93 92 return; … … 188 187 </tr> 189 188 <?php endif; ?> 190 189 190 <?php if ( defined( 'BACKGROUND_IMAGE' ) ) : // Show only if a default background image exists ?> 191 191 <tr valign="top"> 192 <th scope="row"><?php _e('Restore Original Image'); ?></th> 193 <td><p><?php _e('This will restore the original background image. You will not be able to restore any customizations.') ?></p> 194 <form method="post" action=""> 195 <?php wp_nonce_field('custom-background'); ?> 196 <input type="submit" class="button" name="reset-background" value="<?php esc_attr_e('Restore Original Image'); ?>" /> 197 </form> 198 </td> 199 </tr> 200 </form> 201 <?php endif; ?> 202 <tr valign="top"> 192 203 <th scope="row"><?php _e('Upload Image'); ?></th> 193 204 <td><form enctype="multipart/form-data" id="uploadForm" method="POST" action=""> 194 205 <label for="upload"><?php _e('Choose an image from your computer:'); ?></label><br /><input type="file" id="upload" name="import" />