You are here

function wysiwyg_get_plugins in Wysiwyg 7.2

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

Return plugin metadata from the plugin registry.

Parameters

$editor_name: The internal name of an editor to return plugins for.

Return value

An array for each plugin.

7 calls to wysiwyg_get_plugins()
wysiwyg_add_plugin_settings in ./wysiwyg.module
Add settings for external plugins.
wysiwyg_ckeditor_settings in editors/ckeditor.inc
Return runtime editor settings for a given wysiwyg profile.
wysiwyg_fckeditor_settings in editors/fckeditor.inc
Return runtime editor settings for a given wysiwyg profile.
wysiwyg_profile_form in ./wysiwyg.admin.inc
Form builder for Wysiwyg profile form.
wysiwyg_tinymce_settings in editors/tinymce.inc
Return runtime editor settings for a given wysiwyg profile.

... See full list

File

./wysiwyg.module, line 669

Code

function wysiwyg_get_plugins($editor_name) {
  $plugins = array();
  if (!empty($editor_name)) {
    $editor = wysiwyg_get_editor($editor_name);

    // Add internal editor plugins.
    if (isset($editor['plugin callback']) && function_exists($editor['plugin callback'])) {
      $plugins = $editor['plugin callback']($editor);
    }

    // Add editor plugins provided via hook_wysiwyg_plugin().
    $plugins = array_merge($plugins, module_invoke_all('wysiwyg_plugin', $editor['name'], $editor['installed version']));

    // Add API plugins provided by Drupal modules.
    // @todo We need to pass the filepath to the plugin icon for Drupal plugins.
    if (isset($editor['proxy plugin'])) {
      $plugins += $editor['proxy plugin'];
      $proxy = key($editor['proxy plugin']);
      foreach (wysiwyg_get_all_plugins() as $plugin_name => $info) {
        $plugins[$proxy]['buttons'][$plugin_name] = $info['title'];
      }
    }
  }
  return $plugins;
}