You are here

function _xbbcode_module_names in Extensible BBCode 7

Same name and namespace in other branches
  1. 8 xbbcode.inc \_xbbcode_module_names()
  2. 8.2 xbbcode.inc \_xbbcode_module_names()

End-user names of all modules that implement hook_xbbcode_info().

These names are displayed on the settings form when choosing a module that should handle each tag. The xbbcode module itself is renamed "Custom" since its tags are the ones entered through the admin interface.

2 calls to _xbbcode_module_names()
xbbcode_rebuild_handlers in ./xbbcode.module
_xbbcode_build_handlers in ./xbbcode.inc
Discover the handlers by module hook invokation.
1 string reference to '_xbbcode_module_names'
xbbcode_modules_enabled in ./xbbcode.module
Implements hook_modules_enabled().

File

./xbbcode.inc, line 141
General library of internal functions only called by this module.

Code

function _xbbcode_module_names() {
  $modules =& drupal_static(__FUNCTION__, array());
  if (!$modules) {
    $info = system_get_info('module');
    foreach (module_implements('xbbcode_info') as $module) {
      $modules[$module] = $info[$module]['name'];
    }
    $modules['xbbcode'] = 'Custom';
  }
  return $modules;
}