Created
March 13, 2015 17:22
-
-
Save kporras07/b5c087fc792953020359 to your computer and use it in GitHub Desktop.
Use hook_module_implements_alter for changing hooks execution order.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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