Skip to content

Instantly share code, notes, and snippets.

@kporras07
Created March 13, 2015 17:22
Show Gist options
  • Save kporras07/b5c087fc792953020359 to your computer and use it in GitHub Desktop.
Save kporras07/b5c087fc792953020359 to your computer and use it in GitHub Desktop.
Use hook_module_implements_alter for changing hooks execution order.
/**
* Implements hook_module_implements_alter().
*/
function mymodule_module_implements_alter(&$implementations, $hook) {
// We need this hook running at the end.
if ($hook == 'form_alter' && isset($implementations['mymodule'])) {
$mymodule = $implementations['mymodule'];
unset($implementations['mymodule']);
$implementations['mymodule'] = $mymodule;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment