You are here

function _wysiwyg_process_include in Wysiwyg 5

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

Process a single hook implementation of a wysiwyg editor.

Parameters

$module: The module that owns the hook.

$identifier: Either the module or 'wysiwyg_' . $file->name

$hook: The name of the hook being invoked.

Related topics

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

File

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

Code

function _wysiwyg_process_include($module, $identifier, $path, $hook) {
  $function = $identifier . '_' . $hook;
  if (!function_exists($function)) {
    return NULL;
  }
  $result = $function();
  if (!isset($result) || !is_array($result)) {
    return NULL;
  }

  // Fill in defaults.
  foreach ($result as $editor => $properties) {
    $result[$editor]['module'] = $module;
    $result[$editor]['name'] = $editor;
    $result[$editor]['path'] = $path;
  }
  return $result;
}