function asset_ckeditor_plugin in Asset 7
Implements hook_ckeditor_plugin().
File
- ./
asset.module, line 630 - Asset module.
Code
function asset_ckeditor_plugin() {
$plugin_name = 'asset';
$plugins = array(
$plugin_name => array(
'name' => $plugin_name,
'desc' => t('Media assets'),
'path' => ASSET_MODULE_CKEDITOR_PLUGIN_PATH . '/',
'buttons' => array(),
),
);
foreach (assets_get_types() as $type) {
$plugins[$plugin_name]['buttons']['asset_' . $type->type] = array();
$plugins[$plugin_name]['buttons']['asset_' . $type->type]['label'] = t('Asset') . ': ' . $type->name;
$plugins[$plugin_name]['buttons']['asset_' . $type->type]['icon'] = 'buttons/' . $type->icon;
}
if (module_exists('views')) {
$plugins[$plugin_name]['buttons']['assetSearch'] = array(
'label' => t('Assets library'),
'icon' => 'search.png',
);
}
return $plugins;
}