You are here

function _themekey_invoke_modules in ThemeKey 6

Function _themekey_invoke_modules().

3 calls to _themekey_invoke_modules()
themekey_themekey_global in ./themekey.module
Implementation of hook_themekey_global().
themekey_themekey_paths in ./themekey.module
Implementation of hook_themekey_paths().
themekey_themekey_properties in ./themekey.module
Implementation of hook_themekey_properties().

File

./themekey_base.inc, line 6

Code

function _themekey_invoke_modules($hook) {
  $return = array();
  foreach (variable_get('themekey_modules', array(
    'themekey.node',
  )) as $module) {
    if (is_readable(drupal_get_path('module', 'themekey') . '/modules/' . $module . '.inc')) {
      require_once drupal_get_path('module', 'themekey') . '/modules/' . $module . '.inc';
    }
    $function = str_replace('.', '_', $module) . '_' . $hook;
    if (function_exists($function)) {
      $return = array_merge_recursive($return, $function());
    }
  }
  return $return;
}