Make WordPress Core


Ignore:
Timestamp:
10/04/2006 11:28:38 AM (15 years ago)
Author:
markjaquith
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options.php

    r4329 r4330  
    117117<div class="wrap">
    118118  <h2><?php _e('All options'); ?></h2>
    119   <form name="form" action="options.php" method="post">
     119  <form name="form" action="options.php" method="post" id="all-options">
    120120  <?php wp_nonce_field('update-options') ?>
    121121  <input type="hidden" name="action" value="update" />
     
    129129<tr>
    130130    <th scope='row'><label for='$option->option_name'>$option->option_name</label></th>
    131     <td><input type='text' name='$option->option_name' id='$option->option_name' size='30' value='" . $value . "' /></td>
     131<td>";
     132
     133    if (stristr($value, "\n")) echo "<textarea name='$option->option_name' id='$option->option_name' cols='30' rows='5'>$value</textarea>";
     134    else echo "<input type='text' name='$option->option_name' id='$option->option_name' size='30' value='" . $value . "' />";
     135   
     136    echo "</td>
    132137    <td>$option->option_description</td>
    133138</tr>";
Note: See TracChangeset for help on using the changeset viewer.