Ticket #9175: 9175.3.diff
File 9175.3.diff, 1.1 KB (added by , 11 years ago) |
---|
-
wp-admin/options.php
190 190 $options_to_update[] = $option->option_name; 191 191 $class = 'all-options'; 192 192 } else { 193 $value = 'SERIALIZED DATA';193 $value = print_r(maybe_unserialize( $option->option_value ), true); 194 194 $disabled = true; 195 195 $class = 'all-options disabled'; 196 196 } … … 204 204 <tr> 205 205 <th scope='row'><label for='$name'>" . esc_html( $option->option_name ) . "</label></th> 206 206 <td>"; 207 if ( strpos( $value, "\n" ) !== false)208 echo "<textarea class='$class' name='$name' id='$name' cols='30' rows=' 5'>" . esc_textarea( $value ) . "</textarea>";207 if ( $rows = substr_count($value, "\n") ) 208 echo "<textarea class='$class' name='$name' id='$name' cols='30' rows='$rows'>" . esc_textarea( $value ) . "</textarea>"; 209 209 else 210 210 echo "<input class='regular-text $class' type='text' name='$name' id='$name' value='" . esc_attr( $value ) . "'" . disabled( $disabled, true, false ) . " />"; 211 211 echo "</td>