preserve multi-line options in options.php. Props Viper007Bond. fixes #2456

git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2006-10-04 11:28:52 +00:00
parent e464b28558
commit 5014cbb45c
2 changed files with 11 additions and 2 deletions

View File

@ -141,7 +141,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%">
@ -153,7 +153,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;

View File

@ -357,6 +357,10 @@ table .vers, table .name {
text-align: center;
}
#all-options textarea, #all-options input {
width: 250px;
}
#adminmenu {
background: #6da6d1;
border-top: 3px solid #448abd;