You are here

function _answers_insert_after_first_element in Answers 7.4

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

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

2 calls to _answers_insert_after_first_element()
answers_theme_registry_alter in ./answers.module
Implements hook_theme_registry_alter().
answers_theme_theme_registry_alter in answers_theme/answers_theme.module
Implements hook_theme_registry_alter().

File

./answers.module, line 501
The Answers module.

Code

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