function ckeditor_image_plugin_check in CKEditor for WYSIWYG Module 8
Same name and namespace in other branches
- 7 ckeditor.module \ckeditor_image_plugin_check()
Enabled callback for hook_ckeditor_plugins().
Checks if our Caption plugin should be enabled based on the configuration of a text format and editor.
1 string reference to 'ckeditor_image_plugin_check'
- ckeditor_ckeditor_plugins in ./
ckeditor.module - Implements hook_ckeditor_plugins().
File
- ./
ckeditor.module, line 318 - Provides integration with the CKEditor WYSIWYG editor.
Code
function ckeditor_image_plugin_check($editor) {
// Automatically enable caption support if the DrupalImage button is enabled.
foreach ($editor->settings['toolbar']['buttons'] as $row) {
if (in_array('DrupalImage', $row)) {
return TRUE;
}
}
}