Customize: Allow specifying the number of rows for <textarea> inputs.
Previously, the textarea control was forced to use 5 rows. This commit instead applies a default value of 5, but allows for a developer to specify a different number of rows using the input_attrs arg. Props sirlouen, timhavinga, celloexpressions, sainathpoojary. Fixes #47445. Built from https://develop.svn.wordpress.org/trunk@60662 git-svn-id: http://core.svn.wordpress.org/trunk@59998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -566,6 +566,9 @@ class WP_Customize_Control {
|
||||
<?php
|
||||
break;
|
||||
case 'textarea':
|
||||
if ( !array_key_exists( 'rows', $this->input_attrs ) ) {
|
||||
$this->input_attrs['rows'] = 5;
|
||||
}
|
||||
?>
|
||||
<?php if ( ! empty( $this->label ) ) : ?>
|
||||
<label for="<?php echo esc_attr( $input_id ); ?>" class="customize-control-title"><?php echo esc_html( $this->label ); ?></label>
|
||||
@@ -575,7 +578,6 @@ class WP_Customize_Control {
|
||||
<?php endif; ?>
|
||||
<textarea
|
||||
id="<?php echo esc_attr( $input_id ); ?>"
|
||||
rows="5"
|
||||
<?php echo $describedby_attr; ?>
|
||||
<?php $this->input_attrs(); ?>
|
||||
<?php $this->link(); ?>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.9-alpha-60661';
|
||||
$wp_version = '6.9-alpha-60662';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
Reference in New Issue
Block a user