Make WordPress Core


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/wp-admin/options.php

    r4229 r4331  
    142142<div class="wrap">
    143143  <h2><?php _e('All options'); ?></h2>
    144   <form name="form" action="options.php" method="post">
     144  <form name="form" action="options.php" method="post" id="all-options">
    145145  <?php wp_nonce_field('update-options') ?>
    146146  <input type="hidden" name="action" value="update" />
     
    154154<tr>
    155155    <th scope='row'><label for='$option->option_name'>$option->option_name</label></th>
    156     <td><input type='text' name='$option->option_name' id='$option->option_name' size='30' value='" . $value . "' /></td>
     156<td>";
     157
     158    if (stristr($value, "\n")) echo "<textarea name='$option->option_name' id='$option->option_name' cols='30' rows='5'>$value</textarea>";
     159    else echo "<input type='text' name='$option->option_name' id='$option->option_name' size='30' value='" . $value . "' />";
     160   
     161    echo "</td>
    157162    <td>$option->option_description</td>
    158163</tr>";
Note: See TracChangeset for help on using the changeset viewer.