You are here

function imageeditor_initialize_plugin in Image Editor 7

Helper function to initialize plugin.

1 call to imageeditor_initialize_plugin()
imageeditor_initialize in ./imageeditor.module
API function to initialize required editors and uploaders.

File

./imageeditor.module, line 149
Allows online editing of images using different image editing services.

Code

function imageeditor_initialize_plugin(&$plugin) {
  if ($function = ctools_plugin_get_function($plugin, 'initialize_callback')) {
    $function($plugin);
  }
  if (array_key_exists('js', $plugin)) {
    drupal_add_js($plugin['path'] . '/' . $plugin['js'], array(
      'scope' => 'footer',
    ));
  }
  if (array_key_exists('css', $plugin)) {
    drupal_add_css($plugin['path'] . '/' . $plugin['css']);
  }
}