1 ckeditor.module | ckeditor_image_plugin_check($format) |
Enabled callback for hook_ckeditor_plugins().
Checks if our Caption plugin should be enabled based on the configuration of a text format and editor.
Parameters
$format: The filter format object for which CKEditor is checking settings.
Return value
bool: TRUE if the image plugin is enabled, FALSE otherwise.
File
- core/
modules/ ckeditor/ ckeditor.module, line 373 - Provides integration with the CKEditor WYSIWYG editor.
Code
function ckeditor_image_plugin_check($format) {
// Automatically enable caption support if the BackdropImage button is enabled.
foreach ($format->editor_settings['toolbar'] as $row) {
foreach ($row as $button_group) {
if (in_array('BackdropImage', $button_group['items'])) {
return TRUE;
}
}
}
return FALSE;
}