You are here

function _answers_insert_after_first_element in Answers 7.3

Same name and namespace in other branches
  1. 7.4 answers.module \_answers_insert_after_first_element()

Helper function for re-ordering arrays (needed by theme_registry_alter).

1 call to _answers_insert_after_first_element()
answers_theme_registry_alter in ./answers.module
Implements hook_theme_registry_alter().

File

./answers.module, line 176

Code

function _answers_insert_after_first_element(&$a, $element) {
  if (is_array($a)) {
    $first_element = array_shift($a);
    array_unshift($a, $first_element, $element);
  }
}