function patterns_rearrange_data in Patterns 5
Same name and namespace in other branches
- 6.2 patterns.module \patterns_rearrange_data()
- 6 patterns.module \patterns_rearrange_data()
1 call to patterns_rearrange_data()
File
- ./
patterns.module, line 1102 - Enables extremely simple adding/removing features to your site with minimal to no configuration
Code
function patterns_rearrange_data($pattern) {
foreach ($pattern as $key => $value) {
if (is_string($key)) {
unset($pattern[$key]);
}
else {
if ($value['tag'] == 'actions') {
$pattern[$key] = patterns_rearrange_data($value);
$pattern[$key]['tag'] = 'actions';
}
else {
$pattern[$key] = _patterns_rearrange_data($value);
}
}
}
return $pattern;
}