You are here

function wysiwyg_fckeditor_plugin_settings in Wysiwyg 5.2

Build a JS settings array of native external plugins that need to be loaded separately.

1 string reference to 'wysiwyg_fckeditor_plugin_settings'
wysiwyg_fckeditor_editor in editors/fckeditor.inc
Plugin implementation of hook_editor().

File

editors/fckeditor.inc, line 174
Editor integration functions for FCKeditor.

Code

function wysiwyg_fckeditor_plugin_settings($editor, $profile, $plugins) {
  $settings = array();
  foreach ($plugins as $name => $plugin) {

    // Register all plugins that need to be loaded.
    if (!empty($plugin['load'])) {
      $settings[$name] = array();

      // Add path for native external plugins; internal ones do not need a path.
      if (empty($plugin['internal']) && isset($plugin['path'])) {
        $settings[$name]['path'] = base_path() . $plugin['path'];
      }
      if (!empty($plugin['languages'])) {
        $settings[$name]['languages'] = $plugin['languages'];
      }
    }
  }
  return $settings;
}