You are here

function wysiwyg_get_directories in Wysiwyg 6

Same name and namespace in other branches
  1. 5.2 wysiwyg.module \wysiwyg_get_directories()
  2. 5 wysiwyg.module \wysiwyg_get_directories()
  3. 6.2 wysiwyg.module \wysiwyg_get_directories()
  4. 7.2 wysiwyg.module \wysiwyg_get_directories()

Return a list of directories by modules implementing wysiwyg_include_directory().

Parameters

$plugintype: The type of a plugin; can be 'editors'.

Return value

An array containing module names suffixed with '_' and their defined directory.

See also

wysiwyg_load_includes(), _wysiwyg_process_include()

Related topics

1 call to wysiwyg_get_directories()
wysiwyg_load_includes in ./wysiwyg.module
Load include files for wysiwyg implemented by all modules.

File

./wysiwyg.module, line 693
Integrate client-side editors with Drupal.

Code

function wysiwyg_get_directories($plugintype) {
  $directories = array();
  foreach (module_implements('wysiwyg_include_directory') as $module) {
    $result = module_invoke($module, 'wysiwyg_include_directory', $plugintype);
    if (isset($result) && is_string($result)) {
      $directories[$module . '_'] = drupal_get_path('module', $module) . '/' . $result;
    }
  }
  return $directories;
}