function _skinr_array_strip_empty in Skinr 6.2
Same name and namespace in other branches
- 8.2 skinr.module \_skinr_array_strip_empty()
- 6 includes/handlers.inc \_skinr_array_strip_empty()
- 7.2 skinr.module \_skinr_array_strip_empty()
Helper function to remove empty skins from an array.
2 calls to _skinr_array_strip_empty()
- skinr_ui_skinsets_settings_form_submit in ./
skinr_ui.admin.inc - Process skinr_ui_skinsets_settings_form form submissions.
- skinr_validate in ./
skinr.module - Validate a skinr object.
File
- ./
skinr.module, line 549
Code
function _skinr_array_strip_empty($array) {
$new_array = array();
foreach ($array as $key => $value) {
if (is_array($value)) {
$value = _skinr_array_strip_empty($value);
}
if (!empty($value)) {
$new_array[$key] = $value;
}
}
return $new_array;
}