function _commerce_unrequire_element in Commerce Core 7
array_walk_recursive callback: makes an individual element unrequired.
Parameters
&$value: The value of the form array being walked.
$key: The key of the form array corresponding to the present value.
1 string reference to '_commerce_unrequire_element'
- commerce_unrequire_form_elements in ./
commerce.module - Makes any required form elements in a form unrequired.
File
- ./
commerce.module, line 302 - Defines features and functions common to the Commerce modules.
Code
function _commerce_unrequire_element(&$value, $key) {
if ($key === '#required') {
$value = FALSE;
}
}