function _fusion_apply_array_strip_empty in Fusion Accelerator 7
Same name and namespace in other branches
- 7.2 fusion_apply/fusion_apply.module \_fusion_apply_array_strip_empty()
Helper function to remove empty skins from an array.
Parameters
$array: A single or multi-dimensional array to strip of empty values.
Return value
An array stripped of empty values.
2 calls to _fusion_apply_array_strip_empty()
- fusion_apply_skin_validate in fusion_apply/
fusion_apply.module - Validate a skin object.
- fusion_apply_submit_handler in fusion_apply/
fusion_apply.handlers.inc - Fusion Apply submit handler.
File
- fusion_apply/
fusion_apply.module, line 644 - Handles core Fusion Apply functionality.
Code
function _fusion_apply_array_strip_empty($array) {
$new_array = array();
foreach ($array as $key => $value) {
if (is_array($value)) {
$value = _fusion_apply_array_strip_empty($value);
}
if (!empty($value)) {
$new_array[$key] = $value;
}
}
return $new_array;
}