You are here

function simplify_module_implements_alter in Simplify 8

Implements hook_module_implements_alter().

Make sure that our form alter is called AFTER the same hook provided in xxx.

File

./simplify.module, line 359
Hooks implemented by the simplify module.

Code

function simplify_module_implements_alter(&$implementations, $hook) {
  if ($hook == 'form_alter') {

    // Move my_module_form_alter() to the end of the list. module_implements()
    // iterates through $implementations with a foreach loop which PHP iterates
    // in the order that the items were added, so to move an item to the end of
    // the array, we remove it and then add it.
    $group = $implementations['simplify'];
    unset($implementations['simplify']);
    $implementations['simplify'] = $group;
  }
}