WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 4 months ago

#47445 new defect (bug)

Unable to set rows attribute for textarea input in the Customizer

Reported by: timhavinga Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 5.2.1
Component: Customize Keywords: has-patch needs-testing
Focuses: ui Cc:

Description

Hi there,

Currently, when a textarea input is added to the Customizer via WP_Customize_Manager::add_control(), the number of rows is fixed to 5. See line 4140 of the Customize Manager.

Could this be fixed to be 5 by default, but enables me to override this?

Attachments (1)

47445.patch (843 bytes) - added by timhavinga 2 years ago.
Give custom control textareas 5 rows by default, but allow for a custom value

Download all attachments as: .zip

Change History (4)

@timhavinga
2 years ago

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

#1 @timhavinga
2 years ago

  • Keywords has-patch added

#2 @timhavinga
2 years ago

As shown in my patch, the defect was not in class-wp-customize-manager.php, but in class-wp-customize-control.php. The code in the Customize Manager seems to do the right thing, though it is not clear to me when this function is called.

#3 @celloexpressions
4 months ago

  • Keywords needs-testing added
  • Milestone changed from Awaiting Review to Future Release

47445.patch makes sense to me, and allows the API to correctly let this attribute be set with the input_attrs property when registering a control. This needs some testing but looks close to being committable at a glance.

Note: See TracTickets for help on using tickets.