function mediafront_preset_array_flatten in MediaFront 7.2
Same name and namespace in other branches
- 6.2 includes/mediafront.preset.inc \mediafront_preset_array_flatten()
- 6 includes/mediafront.preset.inc \mediafront_preset_array_flatten()
- 7 includes/mediafront.preset.inc \mediafront_preset_array_flatten()
Flatten the settings array.
Parameters
<type> $array:
<type> $return:
Return value
<type>
1 call to mediafront_preset_array_flatten()
- mediafront_preset_submit in includes/
mediafront.preset.inc - Submit handler for the preset form.
File
- includes/
mediafront.preset.inc, line 277
Code
function mediafront_preset_array_flatten($array, $return = array()) {
foreach ($array as $key => $value) {
if (is_array($value) && $key != 'plugins') {
$return = mediafront_preset_array_flatten($value, $return);
}
else {
$return[$key] = is_array($value) ? array_map('check_plain', $value) : $value;
}
}
return $return;
}