preserve multi-line options in options.php. Props Viper007Bond. fixes #2456
git-svn-id: https://develop.svn.wordpress.org/trunk@4330 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7796ff4311
commit
96f6de2526
@ -116,7 +116,7 @@ default:
|
||||
|
||||
<div class="wrap">
|
||||
<h2><?php _e('All options'); ?></h2>
|
||||
<form name="form" action="options.php" method="post">
|
||||
<form name="form" action="options.php" method="post" id="all-options">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
<input type="hidden" name="action" value="update" />
|
||||
<table width="98%">
|
||||
@ -128,7 +128,12 @@ foreach ($options as $option) :
|
||||
echo "
|
||||
<tr>
|
||||
<th scope='row'><label for='$option->option_name'>$option->option_name</label></th>
|
||||
<td><input type='text' name='$option->option_name' id='$option->option_name' size='30' value='" . $value . "' /></td>
|
||||
<td>";
|
||||
|
||||
if (stristr($value, "\n")) echo "<textarea name='$option->option_name' id='$option->option_name' cols='30' rows='5'>$value</textarea>";
|
||||
else echo "<input type='text' name='$option->option_name' id='$option->option_name' size='30' value='" . $value . "' />";
|
||||
|
||||
echo "</td>
|
||||
<td>$option->option_description</td>
|
||||
</tr>";
|
||||
endforeach;
|
||||
|
@ -400,6 +400,10 @@ table .vers {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#all-options textarea, #all-options input {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
#adminmenu {
|
||||
background: #83B4D8;
|
||||
border-top: 3px solid #448abd;
|
||||
|
Loading…
Reference in New Issue
Block a user