function mediafront_preset_array_flatten in MediaFront 7
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.2 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 267
Code
function mediafront_preset_array_flatten($array, $return = array()) {
foreach ($array as $key => $value) {
if (is_array($value)) {
$return = mediafront_preset_array_flatten($value, $return);
}
else {
$return[$key] = check_plain($value);
}
}
return $return;
}