You are here

function media_wysiwyg_media_browser_params_alter in D7 Media 7.4

Same name and namespace in other branches
  1. 7.2 modules/media_wysiwyg/media_wysiwyg.module \media_wysiwyg_media_browser_params_alter()
  2. 7.3 modules/media_wysiwyg/media_wysiwyg.module \media_wysiwyg_media_browser_params_alter()

Implements hook_media_browser_params_alter().

File

modules/media_wysiwyg/media_wysiwyg.module, line 774
Primarily Drupal hooks.

Code

function media_wysiwyg_media_browser_params_alter(&$params) {

  // Set the media browser options as defined in the interface.
  if (!empty($params['id']) && $params['id'] === 'media_wysiwyg') {
    $params = array(
      'enabledPlugins' => variable_get('media_wysiwyg_wysiwyg_browser_plugins', array()),
      'file_directory' => variable_get('media_wysiwyg_wysiwyg_upload_directory', ''),
      'types' => variable_get('media_wysiwyg_wysiwyg_allowed_types', array(
        'audio',
        'image',
        'video',
        'document',
      )),
      'id' => 'media_wysiwyg',
    ) + $params;
  }
}