function _borealis_insert_after_first_element in Borealis 7
Same name and namespace in other branches
- 7.2 borealis.module \_borealis_insert_after_first_element()
Helper function for re-ordering arrays (needed by theme_registry_alter)
From http://www.metachunk.com/blog/adding-module-path-drupal-7-theme-registry
1 call to _borealis_insert_after_first_element()
- borealis_theme_registry_write in ./
borealis.module - Helper function to add module directory to theme registry.
File
- ./
borealis.module, line 24
Code
function _borealis_insert_after_first_element(&$a, $element) {
if (is_array($a)) {
$first_element = array_shift($a);
array_unshift($a, $first_element, $element);
}
}