<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[14209] trunk/wp-admin/custom-background.php: Custom background UI tweaks.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/14209">14209</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-04-23 22:10:21 +0000 (Fri, 23 Apr 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Custom background UI tweaks. Props TECannon. see <a href="http://trac.wordpress.org/ticket/12186">#12186</a>, fixes <a href="http://trac.wordpress.org/ticket/12699">#12699</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmincustombackgroundphp">trunk/wp-admin/custom-background.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmincustombackgroundphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/custom-background.php (14208 => 14209)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/custom-background.php        2010-04-23 21:23:32 UTC (rev 14208)
+++ trunk/wp-admin/custom-background.php        2010-04-23 22:10:21 UTC (rev 14209)
</span><span class="lines">@@ -143,14 +143,18 @@
</span><span class="cx"> <div id="message" class="updated">
</span><span class="cx"> <p><?php printf(__('Background updated. <a href="%s">Visit your site</a> to see how it looks.'), home_url()); ?></p>
</span><span class="cx"> </div>
</span><del>-<?php } ?>
-<p><?php _e('This is your current background.'); ?></p>
-<?php
</del><ins>+<?php }
+
</ins><span class="cx">         if ( $this->admin_image_div_callback ) {
</span><span class="cx">                 call_user_func($this->admin_image_div_callback);
</span><span class="cx">         } else {
</span><span class="cx"> ?>
</span><del>-
</del><ins>+<h3><?php _e('Background Image'); ?></h3>
+<table class="form-table">
+<tbody>
+<tr valign="top">
+<th scope="row"><?php _e('Current Image'); ?></th>
+<td>
</ins><span class="cx"> <style type="text/css">
</span><span class="cx"> #custom-background-image {
</span><span class="cx">         background-color: #<?php echo get_background_color()?>;
</span><span class="lines">@@ -170,20 +174,51 @@
</span><span class="cx"> <br class="clear" />
</span><span class="cx"> </div>
</span><span class="cx"> <?php } ?>
</span><del>-<h3><?php _e('Change Display Options') ?></h3>
</del><ins>+</td>
+</tr>
+<?php if ( get_background_image() ) : ?>
+<tr valign="top">
+<th scope="row"><?php _e('Remove Image'); ?></th>
+<td><p><?php _e('This will remove the background image. You will not be able to restore any customizations.') ?></p>
</ins><span class="cx"> <form method="post" action="">
</span><del>-<table>
-<thead>
-<tr>
-<th scope="col"><?php _e( 'Position' ); ?></th>
-<th scope="col"><?php _e( 'Repeat' ); ?></th>
-<th scope="col"><?php _e( 'Attachment' ); ?></th>
-<th scope="col"><?php _e( 'Color' ); ?></th>
</del><ins>+<?php wp_nonce_field('custom-background'); ?>
+<input type="submit" class="button" name="remove-background" value="<?php esc_attr_e('Remove Background'); ?>" />
+</form>
+</td>
</ins><span class="cx"> </tr>
</span><ins>+<?php endif; ?>
</ins><span class="cx">
</span><ins>+<tr valign="top">
+<th scope="row"><?php _e('Upload Image'); ?></th>
+<td><form enctype="multipart/form-data" id="uploadForm" method="POST" action="">
+<label for="upload"><?php _e('Choose an image from your computer:'); ?></label><br /><input type="file" id="upload" name="import" />
+<input type="hidden" name="action" value="save" />
+<?php wp_nonce_field('custom-background') ?>
+<p class="submit">
+<input type="submit" value="<?php esc_attr_e('Upload'); ?>" />
+</p>
+</form>
+</td>
+</tbody>
+</table>
+
+<h3><?php _e('Display Options') ?></h3>
+<form method="post" action="">
+<table class="form-table">
</ins><span class="cx"> <tbody>
</span><del>-<tr>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Position' ); ?></span></legend>
</del><ins>+<tr valign="top">
+<th scope="row"><?php _e( 'Background Color' ); ?></th>
+<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Color' ); ?></span></legend>
+<input type="text" name="background-color" id="background-color" value="#<?php echo esc_attr(get_background_color()) ?>" />
+<input type="button" class="button" value="<?php esc_attr_e('Select a Color'); ?>" id="pickcolor" />
+
+<div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div>
+</fieldset></td>
+</tr>
+
+<tr valign="top">
+<th scope="row"><?php _e( 'Background Position' ); ?></th>
+<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Position' ); ?></span></legend>
</ins><span class="cx"> <label>
</span><span class="cx"> <input name="background-position" type="radio" value="left" <?php checked('left', get_theme_mod('background_position', 'left')); ?> />
</span><span class="cx"> <?php _e('Left') ?>
</span><span class="lines">@@ -197,7 +232,10 @@
</span><span class="cx"> <?php _e('Right') ?>
</span><span class="cx"> </label>
</span><span class="cx"> </fieldset></td>
</span><ins>+</tr>
</ins><span class="cx">
</span><ins>+<tr valign="top">
+<th scope="row"><?php _e( 'Repeat' ); ?></th>
</ins><span class="cx"> <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Repeat' ); ?></span></legend>
</span><span class="cx"> <label>
</span><span class="cx"> <select name="background-repeat">
</span><span class="lines">@@ -208,7 +246,10 @@
</span><span class="cx"> </select>
</span><span class="cx"> </label>
</span><span class="cx"> </fieldset></td>
</span><ins>+</tr>
</ins><span class="cx">
</span><ins>+<tr valign="top">
+<th scope="row"><?php _e( 'Attachment' ); ?></th>
</ins><span class="cx"> <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Attachment' ); ?></span></legend>
</span><span class="cx"> <label>
</span><span class="cx"> <input name="background-attachment" type="radio" value="scroll" <?php checked('scroll', get_theme_mod('background_attachment', 'fixed')); ?> />
</span><span class="lines">@@ -219,40 +260,15 @@
</span><span class="cx"> <?php _e('Fixed') ?>
</span><span class="cx"> </label>
</span><span class="cx"> </fieldset></td>
</span><ins>+</tr>
</ins><span class="cx">
</span><del>-<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Color' ); ?></span></legend>
-<input type="text" name="background-color" id="background-color" value="#<?php echo esc_attr(get_background_color()) ?>" />
-<input type="button" class="button" value="<?php esc_attr_e('Select a Color'); ?>" id="pickcolor" />
-
-<div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div>
-</fieldset></td>
-</tr>
</del><span class="cx"> </tbody>
</span><span class="cx"> </table>
</span><span class="cx">
</span><span class="cx"> <?php wp_nonce_field('custom-background'); ?>
</span><del>-<p class="submit"><input type="submit" class="button" name="save-background-options" value="<?php esc_attr_e('Save Changes'); ?>" /></p>
</del><ins>+<p class="submit"><input type="submit" class="button-primary" name="save-background-options" value="<?php esc_attr_e('Save Changes'); ?>" /></p>
</ins><span class="cx"> </form>
</span><span class="cx">
</span><del>-<h3><?php _e('Upload New Background Image'); ?></h3>
-<form enctype="multipart/form-data" id="uploadForm" method="POST" action="">
-<label for="upload"><?php _e('Choose an image from your computer:'); ?></label><br /><input type="file" id="upload" name="import" />
-<input type="hidden" name="action" value="save" />
-<?php wp_nonce_field('custom-background') ?>
-<p class="submit">
-<input type="submit" value="<?php esc_attr_e('Upload'); ?>" />
-</p>
-</form>
-
-<?php if ( get_background_image() ) : ?>
-<h3><?php _e('Remove Background Image'); ?></h3>
-<p><?php _e('This will remove the 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="remove-background" value="<?php esc_attr_e('Remove Background'); ?>" />
-</form>
-<?php endif; ?>
-
</del><span class="cx"> </div>
</span><span class="cx"> <?php
</span><span class="cx">         }
</span></span></pre>
</div>
</div>
</body>
</html>