Options: Avoid extra tabs in a textarea in `wp-admin/options.php`.

See #43252.

git-svn-id: https://develop.svn.wordpress.org/trunk@42671 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2018-02-08 10:57:14 +00:00
parent d6bfc44a16
commit 0859c8c968
1 changed files with 2 additions and 6 deletions

View File

@ -290,12 +290,8 @@ foreach ( (array) $options as $option ) :
<tr>
<th scope="row"><label for="<?php echo $name; ?>"><?php echo esc_html( $option->option_name ); ?></label></th>
<td>
<?php if ( strpos( $value, "\n" ) !== false ) : ?>
<textarea class="<?php echo $class; ?>" name="<?php echo $name; ?>" id="<?php echo $name; ?>" cols="30" rows="5">
<?php
echo esc_textarea( $value );
?>
</textarea>
<?php if ( strpos( $value, "\n" ) !== false ) : ?>
<textarea class="<?php echo $class; ?>" name="<?php echo $name; ?>" id="<?php echo $name; ?>" cols="30" rows="5"><?php echo esc_textarea( $value ); ?></textarea>
<?php else : ?>
<input class="regular-text <?php echo $class; ?>" type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo esc_attr( $value ); ?>"<?php disabled( $disabled, true ); ?> />
<?php endif ?></td>