function media_gallery_module_implements_alter in Media Gallery 7.2
Same name and namespace in other branches
- 7 media_gallery.module \media_gallery_module_implements_alter()
Implements hook_module_implements_alter().
File
- ./
media_gallery.module, line 1441
Code
function media_gallery_module_implements_alter(&$implementations, $hook) {
switch ($hook) {
// TODO: All we really need to control here is
// form_taxonomy_form_term_alter; if D7 gets fixed to allow that level of
// control, this can be changed.
//case 'form_taxonomy_form_term_alter':
case 'form_alter':
if (!isset($implementations['media_gallery'])) {
break;
}
$group = $implementations['media_gallery'];
unset($implementations['media_gallery']);
$implementations['media_gallery'] = $group;
break;
// We need to ensure that these hooks run before the corresponding Pathauto
// implementations. Given what they do, it's harmless to put them at the
// very front of the list, so we do that because it's easiest.
case 'taxonomy_term_insert':
case 'taxonomy_term_update':
if (isset($implementations['media_gallery'])) {
$implementations = array(
'media_gallery' => $implementations['media_gallery'],
) + $implementations;
}
break;
}
}