function variable_module_include in Variable 7
Same name and namespace in other branches
- 6 variable.inc \variable_module_include()
- 7.2 variable.inc \variable_module_include()
General function to include variable definitions for all modules
4 calls to variable_module_include()
- variable_build_info in ./variable.inc 
- Build generic variable information
- variable_callback in ./variable.inc 
- Invoke variable callback
- variable_include in ./variable.module 
- Include extended API and files related to specific variable
- variable_type_include in ./variable.module 
- Include variable type files
File
- ./variable.inc, line 228 
- Variable API module. Extended API.
Code
function variable_module_include($modules = NULL) {
  static $core_modules = array(
    'locale',
    'forum',
    'menu',
    'node',
    'system',
    'taxonomy',
    'translation',
    'user',
  );
  static $included = array();
  $modules = $modules ? is_array($modules) ? $modules : array(
    $modules,
  ) : $core_modules;
  foreach ($modules as $module) {
    if (!isset($included[$module])) {
      if (module_exists($module)) {
        if (in_array($module, $core_modules)) {
          $included[$module] = module_load_include('variable.inc', 'variable', 'includes/' . $module);
        }
        else {
          $included[$module] = module_load_include('variable.inc', $module);
        }
      }
    }
  }
}