function ckeditor_link_get_types

cis7 ckeditor_link.module ckeditor_link_get_types()
cle7 ckeditor_link.module ckeditor_link_get_types()
elmsmedia7 ckeditor_link.module ckeditor_link_get_types()
icor7 ckeditor_link.module ckeditor_link_get_types()
meedjum_blog7 ckeditor_link.module ckeditor_link_get_types()
mooc7 ckeditor_link.module ckeditor_link_get_types()
4 calls to ckeditor_link_get_types()
ckeditor_link_autocomplete in sites/all/modules/ulmus/ckeditor_link/ckeditor_link.module
ckeditor_link_revert in sites/all/modules/ulmus/ckeditor_link/ckeditor_link.module
ckeditor_link_settings_form in sites/all/modules/ulmus/ckeditor_link/ckeditor_link.admin.inc
_ckeditor_link_filter_process in sites/all/modules/ulmus/ckeditor_link/ckeditor_link.module

File

sites/all/modules/ulmus/ckeditor_link/ckeditor_link.module, line 97
Written by Henri MEDOT <henri.medot[AT]absyx[DOT]fr> http://www.absyx.fr

Code

function ckeditor_link_get_types() {
  static $types;

  if (!isset($types)) {
    $types = array();

    $data = array();
    foreach (module_implements('ckeditor_link_types') as $module) {
      $func = $module . '_ckeditor_link_types';
      $data[$module] = $func();
    }

    foreach ($data as $module => $_types) {
      foreach ($_types as $type) {
        if (!is_array($type)) {
          $type = array('type' => $type);
        }
        $type['module'] = $module;
        $types[$module . '.' . $type['type']] = $type;
      }
    }

    drupal_alter('ckeditor_link_types', $types);
    $types = array_values($types);

    foreach ($types as $type) {
      if (isset($type['file'])) {
        require_once (drupal_get_path('module', $type['module']) . '/' . $type['file']);
      }
    }
  }

  return $types;
}