You are here

function wysiwyg_fckeditor_proxy_plugin_settings in Wysiwyg 5.2

Build a JS settings array for Drupal plugins loaded via the proxy plugin.

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

File

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

Code

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

    // Populate required plugin settings.
    $settings[$name] = $plugin['dialog settings'] + array(
      'title' => $plugin['title'],
      'icon' => base_path() . $plugin['icon path'] . '/' . $plugin['icon file'],
      'iconTitle' => $plugin['icon title'],
      // @todo These should only be set if the plugin defined them.
      'css' => base_path() . $plugin['css path'] . '/' . $plugin['css file'],
    );
  }
  return $settings;
}