function wysiwyg_get_all_plugins in Wysiwyg 6.2
Same name and namespace in other branches
- 5.2 wysiwyg.module \wysiwyg_get_all_plugins()
- 7.2 wysiwyg.module \wysiwyg_get_all_plugins()
Invoke hook_wysiwyg_plugin() in all modules.
Related topics
3 calls to wysiwyg_get_all_plugins()
- wysiwyg_add_plugin_settings in ./
wysiwyg.module - Add settings for external plugins.
- wysiwyg_dialog in ./
wysiwyg.dialog.inc - Menu callback; Output a wysiwyg plugin dialog page.
- wysiwyg_get_plugins in ./
wysiwyg.module - Return plugin metadata from the plugin registry.
File
- ./
wysiwyg.module, line 1046 - Integrates client-side editors with Drupal.
Code
function wysiwyg_get_all_plugins() {
static $plugins;
if (isset($plugins)) {
return $plugins;
}
$plugins = wysiwyg_load_includes('plugins', 'plugin');
foreach ($plugins as $name => $properties) {
$plugin =& $plugins[$name];
// Fill in required/default properties.
$plugin += array(
'title' => $plugin['name'],
'vendor url' => '',
'js path' => $plugin['path'] . '/' . $plugin['name'],
'js file' => $plugin['name'] . '.js',
'css path' => $plugin['path'] . '/' . $plugin['name'],
'css file' => $plugin['name'] . '.css',
'icon path' => $plugin['path'] . '/' . $plugin['name'] . '/images',
'icon file' => $plugin['name'] . '.png',
'dialog path' => $plugin['name'],
'dialog settings' => array(),
'settings callback' => NULL,
'settings form callback' => NULL,
);
// Fill in default settings.
$plugin['settings'] += array(
'path' => base_path() . $plugin['path'] . '/' . $plugin['name'],
);
// Check whether library is present.
if (!($plugin['installed'] = file_exists($plugin['js path'] . '/' . $plugin['js file']))) {
continue;
}
}
return $plugins;
}