Ensure validation. props Utkarsh, see #13383.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5478a0a538
commit
cb0a9024ad
|
@ -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