Make WordPress Core

Ticket #47445: 47445.patch

File 47445.patch, 843 bytes (added by timhavinga, 6 years ago)

Give custom control textareas 5 rows by default, but allow for a custom value

  • src/wp-includes/class-wp-customize-control.php

     
    554554                                <?php
    555555                                break;
    556556                        case 'textarea':
     557                                if ( !array_key_exists( 'rows', $this->input_attrs ) ) {
     558                                        $this->input_attrs['rows'] = 5;
     559                                }
    557560                                ?>
    558561                                <?php if ( ! empty( $this->label ) ) : ?>
    559562                                        <label for="<?php echo esc_attr( $input_id ); ?>" class="customize-control-title"><?php echo esc_html( $this->label ); ?></label>
     
    563566                                <?php endif; ?>
    564567                                <textarea
    565568                                        id="<?php echo esc_attr( $input_id ); ?>"
    566                                         rows="5"
    567569                                        <?php echo $describedby_attr; ?>
    568570                                        <?php $this->input_attrs(); ?>
    569571                                        <?php $this->link(); ?>