Ensure validation. props Utkarsh, see #13383.
git-svn-id: https://develop.svn.wordpress.org/trunk@14628 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
265a0fedd2
commit
9af98709d8
|
@ -155,7 +155,10 @@ class Custom_Background {
|
||||||
<th scope="row"><?php _e('Current Background'); ?></th>
|
<th scope="row"><?php _e('Current Background'); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$background_styles = "background-color: #" . get_background_color() . ";";
|
$background_styles = '';
|
||||||
|
if ( get_background_color() ) {
|
||||||
|
$background_styles .= "background-color: #" . get_background_color() . ";";
|
||||||
|
}
|
||||||
|
|
||||||
if ( get_background_image() ) {
|
if ( get_background_image() ) {
|
||||||
$background_styles .= "
|
$background_styles .= "
|
||||||
|
@ -202,7 +205,7 @@ if ( get_background_image() ) {
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<th scope="row"><?php _e('Upload Image'); ?></th>
|
<th scope="row"><?php _e('Upload Image'); ?></th>
|
||||||
<td><form enctype="multipart/form-data" id="uploadForm" method="POST" action="">
|
<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" />
|
<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" />
|
<input type="hidden" name="action" value="save" />
|
||||||
<?php wp_nonce_field('custom-background') ?>
|
<?php wp_nonce_field('custom-background') ?>
|
||||||
|
|
Loading…
Reference in New Issue