[wp-hackers] Ability to compare arrays in checked() function
sudar at sudarmuthu.com
Thu Aug 6 12:10:18 UTC 2009
The checked() function (present in wp-admin/includes/template.php) checks
whether two parameters passed to it are equal and then outputs
checked='checked', which can be used in forms having checkboxes or radio
Sometimes (particularly for checkboxes), we might need to check for multiple
values. So I am proposing a change to the checked() function.
It can first check whether the default value is an array and if yes, it can
return checked='checked' if the current value is present in the default
I have created a new ticket and have attached a patch with this change.<
Do let me know what you guys think about it.
More information about the wp-hackers