Ticket #12186: background-ui-tweaks.patch
File background-ui-tweaks.patch, 5.9 KB (added by , 15 years ago) |
---|
-
wp-admin/custom-background.php
139 139 <div class="wrap" id="custom-background"> 140 140 <?php screen_icon(); ?> 141 141 <h2><?php _e('Custom Background'); ?></h2> 142 143 142 144 <?php if ( !empty($this->updated) ) { ?> 143 145 <div id="message" class="updated"> 144 146 <p><?php printf(__('Background updated. <a href="%s">Visit your site</a> to see how it looks.'), home_url()); ?></p> 145 147 </div> 146 148 <?php } ?> 147 <p><?php _e('This is your current background.'); ?></p> 149 150 151 152 148 153 <?php 149 154 if ( $this->admin_image_div_callback ) { 150 155 call_user_func($this->admin_image_div_callback); 151 156 } else { 152 157 ?> 153 158 159 <!-- Start Background Image --> 160 <h3><?php _e('Background Image'); ?></h3> 161 <table class="form-table"> 162 <tbody> 163 <tr valign="top"> 164 <th scope="row"><?php _e('Current Image'); ?></th> 165 <td> 154 166 <style type="text/css"> 155 167 #custom-background-image { 156 168 background-color: #<?php echo get_background_color()?>; … … 170 182 <br class="clear" /> 171 183 </div> 172 184 <?php } ?> 173 <h3><?php _e('Change Display Options') ?></h3> 185 </td> 186 </tr> 187 188 189 <?php if ( get_background_image() ) : ?> 190 <tr valign="top"> 191 <th scope="row"><?php _e('Remove Image'); ?></th> 192 <td><p><?php _e('This will remove the background image. You will not be able to restore any customizations.') ?></p> 174 193 <form method="post" action=""> 175 <table> 176 <thead> 177 <tr> 178 <th scope="col"><?php _e( 'Position' ); ?></th> 179 <th scope="col"><?php _e( 'Repeat' ); ?></th> 180 <th scope="col"><?php _e( 'Attachment' ); ?></th> 181 <th scope="col"><?php _e( 'Color' ); ?></th> 194 <?php wp_nonce_field('custom-background'); ?> 195 <input type="submit" class="button" name="remove-background" value="<?php esc_attr_e('Remove Background'); ?>" /> 196 </form> 197 </td> 182 198 </tr> 199 <?php endif; ?> 183 200 201 202 <tr valign="top"> 203 <th scope="row"><?php _e('Upload Image'); ?></th> 204 <td><form enctype="multipart/form-data" id="uploadForm" method="POST" action=""> 205 <label for="upload"><?php _e('Choose an image from your computer:'); ?></label><br /><input type="file" id="upload" name="import" /> 206 <input type="hidden" name="action" value="save" /> 207 <?php wp_nonce_field('custom-background') ?> 208 <p class="submit"> 209 <input type="submit" value="<?php esc_attr_e('Upload'); ?>" /> 210 </p> 211 </form> 212 </td> 213 </tbody> 214 </table> 215 216 217 <h3><?php _e('Display Options') ?></h3> 218 <form method="post" action=""> 219 <table class="form-table"> 184 220 <tbody> 185 <tr> 186 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Position' ); ?></span></legend> 221 222 <tr valign="top"> 223 <th scope="row"><?php _e( 'Background Color' ); ?></th> 224 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Color' ); ?></span></legend> 225 <input type="text" name="background-color" id="background-color" value="#<?php echo esc_attr(get_background_color()) ?>" /> 226 <input type="button" class="button" value="<?php esc_attr_e('Select a Color'); ?>" id="pickcolor" /> 227 228 <div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div> 229 </fieldset></td> 230 </tr> 231 232 <tr valign="top"> 233 <th scope="row"><?php _e( 'Background Position' ); ?></th> 234 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Position' ); ?></span></legend> 187 235 <label> 188 236 <input name="background-position" type="radio" value="left" <?php checked('left', get_theme_mod('background_position', 'left')); ?> /> 189 237 <?php _e('Left') ?> … … 197 245 <?php _e('Right') ?> 198 246 </label> 199 247 </fieldset></td> 248 </tr> 200 249 250 <tr valign="top"> 251 <th scope="row"><?php _e( 'Repeat' ); ?></th> 201 252 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Repeat' ); ?></span></legend> 202 253 <label> 203 254 <select name="background-repeat"> … … 208 259 </select> 209 260 </label> 210 261 </fieldset></td> 262 </tr> 211 263 264 <tr valign="top"> 265 <th scope="row"><?php _e( 'Attachment' ); ?></th> 212 266 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Attachment' ); ?></span></legend> 213 267 <label> 214 268 <input name="background-attachment" type="radio" value="scroll" <?php checked('scroll', get_theme_mod('background_attachment', 'fixed')); ?> /> … … 219 273 <?php _e('Fixed') ?> 220 274 </label> 221 275 </fieldset></td> 276 </tr> 222 277 223 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Color' ); ?></span></legend>224 <input type="text" name="background-color" id="background-color" value="#<?php echo esc_attr(get_background_color()) ?>" />225 <input type="button" class="button" value="<?php esc_attr_e('Select a Color'); ?>" id="pickcolor" />226 227 <div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div>228 </fieldset></td>229 </tr>230 278 </tbody> 231 279 </table> 232 280 233 281 <?php wp_nonce_field('custom-background'); ?> 234 <p class="submit"><input type="submit" class="button " name="save-background-options" value="<?php esc_attr_e('Save Changes'); ?>" /></p>282 <p class="submit"><input type="submit" class="button-primary" name="save-background-options" value="<?php esc_attr_e('Save Changes'); ?>" /></p> 235 283 </form> 236 284 237 <h3><?php _e('Upload New Background Image'); ?></h3>238 <form enctype="multipart/form-data" id="uploadForm" method="POST" action="">239 <label for="upload"><?php _e('Choose an image from your computer:'); ?></label><br /><input type="file" id="upload" name="import" />240 <input type="hidden" name="action" value="save" />241 <?php wp_nonce_field('custom-background') ?>242 <p class="submit">243 <input type="submit" value="<?php esc_attr_e('Upload'); ?>" />244 </p>245 </form>246 247 <?php if ( get_background_image() ) : ?>248 <h3><?php _e('Remove Background Image'); ?></h3>249 <p><?php _e('This will remove the background image. You will not be able to restore any customizations.') ?></p>250 <form method="post" action="">251 <?php wp_nonce_field('custom-background'); ?>252 <input type="submit" class="button" name="remove-background" value="<?php esc_attr_e('Remove Background'); ?>" />253 </form>254 <?php endif; ?>255 256 285 </div> 257 286 <?php 258 287 }