function _patterns_modify_value in Patterns 6
Same name and namespace in other branches
- 5 patterns.module \_patterns_modify_value()
- 6.2 patterns.module \_patterns_modify_value()
- 7.2 includes/unused.inc \_patterns_modify_value()
- 7 includes/unused.inc \_patterns_modify_value()
Function callback
File
- ./
patterns.module, line 2135 - Enables extremely simple adding/removing features to your site with minimal to no configuration
Code
function _patterns_modify_value(&$form) {
foreach ($form as $key => $value) {
if (is_array($value) && isset($value['#type']) && $value['#type'] == 'value') {
$form[$key]['#default_value'] = $value['#value'];
unset($form[$key]['#value']);
}
else {
if (is_array($value)) {
_patterns_modify_value($form[$key]);
}
}
}
}