You are here

function media_media_plugin in D7 Media 7

Implementation of WYSIWYG's hook_INCLUDE_plugin().

File

wysiwyg_plugins/media.inc, line 11
Define the WYSIWYG browser plugin.

Code

function media_media_plugin() {

  // Include the required browser JS.
  // @todo: wyswiyg should allow libraries and multiple js files
  // to be defined by this hook.
  // @see http://drupal.org/node/1039076
  media_include_browser_js();

  // Plugin definition
  $plugins['media'] = array(
    'title' => media_variable_get('wysiwyg_title'),
    'vendor url' => 'http://drupal.org/project/media',
    'icon path' => drupal_get_path('module', 'media') . '/images',
    'icon file' => 'wysiwyg-media.gif',
    'icon title' => media_variable_get('wysiwyg_icon_title'),
    // @todo: move this to the plugin directory for the wysiwyg plugin.
    'js path' => drupal_get_path('module', 'media') . '/js',
    'js file' => 'wysiwyg-media.js',
    'css file' => NULL,
    'css path' => NULL,
    'settings' => array(
      'global' => array(
        'types' => media_variable_get('wysiwyg_allowed_types'),
        'id' => 'media_wysiwyg',
      ),
    ),
  );
  return $plugins;
}