You are here

function tinymce_image_plugin_check in TinyMCE 7

Enabled callback for hook_tinymce_plugins().

Checks if our Caption plugin should be enabled based on the configuration of a text format and editor.

1 string reference to 'tinymce_image_plugin_check'
tinymce_tinymce_plugins in ./tinymce.module
Implements hook_tinymce_plugins().

File

./tinymce.module, line 330

Code

function tinymce_image_plugin_check($editor, $format) {

  // Automatically enable caption support if the DrupalImage button is enabled.
  foreach ($editor->settings['toolbar'] as $row) {
    if (in_array('DrupalImage', $row)) {
      return TRUE;
    }
  }
}