Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #47692, comment 9


Ignore:
Timestamp:
05/12/2020 03:06:30 PM (4 years ago)
Author:
Lwangaman
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #47692, comment 9

    v1 v2  
    1414
    1515Then it would be much easier to check if "$value" is an array, and if so "$label" would become the optgroup label and "$value" would be parsed for the options that fall under that optgroup label. There would be no need to set an "optgroup:true", it would be implicit when the value is an array of more "label=>value" associations.
     16The same would have to apply to radio groups for consistency. Changing this would obviously break current setups that use these components. But it would seem more logical to me...