[wp-trac] [WordPress Trac] #47445: Unable to set rows attribute for textarea input in the Customizer

WordPress Trac noreply at wordpress.org
Fri Jun 27 13:39:15 UTC 2025


#47445: Unable to set rows attribute for textarea input in the Customizer
-------------------------------------+-----------------------------
 Reporter:  timhavinga               |       Owner:  (none)
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Future Release
Component:  Customize                |     Version:  5.2.1
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch has-test-info  |     Focuses:  ui
-------------------------------------+-----------------------------
Changes (by SirLouen):

 * keywords:  has-patch needs-testing => has-patch has-test-info
 * type:  defect (bug) => enhancement


Comment:

 == Test Report
 === Description
 This report validates whether the indicated patch works as expected.

 Patch tested:
 https://core.trac.wordpress.org/attachment/ticket/47445/47445.patch

 === Environment
 - WordPress: 6.9-alpha-60093-src
 - PHP: 8.2.28
 - Server: nginx/1.29.0
 - Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
 - Browser: Chrome 137.0.0.0
 - OS: Windows 10/11
 - Theme: Twenty Twenty-One 2.5
 - MU Plugins: None activated
 - Plugins:
   * Test Reports 1.2.0

 === Testing Instructions
 1. Add the code provided in Artifacts somewhere where it can be executed
 2. Go to the Customizer and select the new Menu
 3. Here we can see the customized Text Area rows.

 === Actual Results
 1.  ✅ Issue resolved with patch:

 [[Image(https://i.imgur.com/AK74nmf.png)]]

 === Additional Notes
 - To me, this looks more like an enhancement than a bug. Being aware that
 enhancements to Customizer have been halted as @celloexpressions commented
 a long time ago, this is a very straightforward patch that could be
 implemented with ease and maybe could serve some users for the last
 stretch of this component. At this point I think its an easy merge with
 tests that doesn't require much thinking.

 - ⚠️ Note that it only has a little PHPCS mistake

 === Supplemental Artifacts
 Test Code

 {{{
 function customizer_textarea_sample( $wp_customize ) {
         $wp_customize->add_section(
                 'customizer_textarea_sample_section',
                 array(
                         'title'    => __( 'Textarea Sample', 'customizer-
 textarea-example' ),
                         'priority' => 10,
                 )
         );

         $wp_customize->add_setting( 'simple_setting' );

         $wp_customize->add_control(
                 'simple_setting',
                 array(
                         'label'   => __( 'Simple Textarea', 'customizer-
 textarea-example' ),
                         'section' => 'customizer_textarea_sample_section',
                         'type'    => 'textarea',
                 )
         );

         $wp_customize->add_setting( 'large_setting' );

         $wp_customize->add_control(
                 'large_setting',
                 array(
                         'label'       => __( 'Large Textarea',
 'customizer-textarea-example' ),
                         'section'     =>
 'customizer_textarea_sample_section',
                         'type'        => 'textarea',
                         'input_attrs' => array(
                                 'rows' => 10,
                         ),
                 )
         );
 }
 add_action( 'customize_register', 'customizer_textarea_sample' );
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47445#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list