You are here

function accordions_module_implements_alter in Accordions 7

Implements hook_module_implements_alter().

The implementations are cached by module_implements_write_cache() so we don't need to add any caching to our processing.

File

./accordions.module, line 32

Code

function accordions_module_implements_alter(&$implementations, $hook) {

  // Disable any hooks for disabled accordion types.
  $disabled_types = accordions_get_types(FALSE);
  foreach ($disabled_types as $type_info) {
    if (!empty($type_info['hooks'])) {
      foreach ($type_info['hooks'] as $module => $hooks) {
        if (in_array($hook, $hooks)) {
          unset($implementations[$module]);
        }
      }
    }
  }
}