Revision 2b3c8cc1
Added by Assos Assos about 9 years ago
drupal7/sites/all/modules/media/modules/media_wysiwyg/media_wysiwyg.ckeditor.inc | ||
---|---|---|
6 | 6 |
*/ |
7 | 7 |
|
8 | 8 |
/** |
9 |
* Implements hook_ckeditor_plugin(). |
|
9 |
* Implements hook_ckeditor_plugin_alter().
|
|
10 | 10 |
*/ |
11 |
function media_wysiwyg_ckeditor_plugin() { |
|
12 |
return array( |
|
13 |
'media' => array( |
|
14 |
'name' => 'media', |
|
15 |
'desc' => t('Plugin for inserting images from Drupal media module'), |
|
16 |
'path' => base_path() . drupal_get_path('module', 'media_wysiwyg') . '/wysiwyg_plugins/media_ckeditor/', |
|
17 |
'buttons' => array( |
|
18 |
'Media' => array( |
|
19 |
'icon' => 'images/icon.gif', |
|
20 |
'label' => 'Add media', |
|
21 |
), |
|
11 |
function media_wysiwyg_ckeditor_plugin_alter(&$plugins) { |
|
12 |
// Override the default CKEditor Media plugin. |
|
13 |
$plugins['media'] = array( |
|
14 |
'name' => 'media', |
|
15 |
'desc' => t('Plugin for inserting images from Drupal media module'), |
|
16 |
'path' => '%base_path%' . drupal_get_path('module', 'media_wysiwyg') . '/wysiwyg_plugins/media_ckeditor/', |
|
17 |
'buttons' => array( |
|
18 |
'Media' => array( |
|
19 |
'icon' => 'images/icon.gif', |
|
20 |
'label' => 'Add media', |
|
22 | 21 |
), |
23 |
'default' => 'f', |
|
24 | 22 |
), |
23 |
'default' => 'f', |
|
25 | 24 |
); |
26 | 25 |
} |
27 |
|
|
28 |
/** |
|
29 |
* Implements hook_ckeditor_plugin_alter(). |
|
30 |
*/ |
|
31 |
function media_wysiwyg_ckeditor_plugin_alter(&$plugins) { |
|
32 |
// To ensure the ckeditor media integration is done by this module all other |
|
33 |
// integrations are overwritten here. However additionally added keys will be |
|
34 |
// left intact. |
|
35 |
$default_plugin = media_wysiwyg_ckeditor_plugin(); |
|
36 |
$plugins['media'] = $default_plugin['media'] + $plugins['media']; |
|
37 |
} |
Also available in: Unified diff
Weekly update of contrib modules