1 ckeditor5.module _ckeditor5_link_image_plugin_check($format, $plugin_name)

Enabled callback for hook_ckeditor5_plugins().

Checks if the Link Image configuration should be loaded. This plugin's functionality is extended by the backdropImage.BackdropImage plugin.

Parameters

object $format: The filter format object for which CKEditor is checking settings.

string $plugin_name: The plugin that is being checked.

Return value

bool: TRUE if the image plugin is enabled, FALSE otherwise.

File

core/modules/ckeditor5/ckeditor5.module, line 922
Provides integration with the CKEditor WYSIWYG editor.

Code

function _ckeditor5_link_image_plugin_check($format, $plugin_name) {
  $link_enabled = in_array('backdropLink', $format->editor_settings['toolbar']);
  $image_enabled = in_array('backdropImage', $format->editor_settings['toolbar']);
  return $link_enabled && $image_enabled;
}