Last active
December 19, 2015 08:59
-
-
Save klakegg/5929836 to your computer and use it in GitHub Desktop.
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
<?php | |
/** | |
* Implements hook_module_implements_alter(). | |
* | |
* Make sure to call hooks with the same prefix as this hook after all other hooks. | |
*/ | |
function MODULE_module_implements_alter(&$implementations, $hook) { | |
$prefix = array_shift(explode('_', __FUNCTION__)); | |
$found = array(); | |
foreach ($implementations as $key => $value) { | |
if (strpos($key, $prefix) !== FALSE) { | |
$found[$key] = $value; | |
unset($implementations[$key]); | |
} | |
} | |
$implementations = array_merge($implementations, $found); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment