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

git-svn-id: http://svn.automattic.com/wordpress/trunk@4330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2006-10-04 11:28:38 +00:00
parent b869fd07f8
commit 3c6648e96c
2 changed files with 11 additions and 2 deletions

View File

@ -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;

View File

@ -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;