Projet

Général

Profil

Révision da542b7b

Ajouté par Assos Assos il y a plus de 7 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/media_ckeditor/media_ckeditor.module
41 41

  
42 42
  return $element;
43 43
}
44

  
45
/**
46
 * Implements hook_form_ID_alter().
47
 */
48
function media_ckeditor_form_media_wysiwyg_format_form_alter(&$form, $form_state) {
49
  // Add our overrides to the media format form javascript.
50
  $form['#attached']['js'][] = drupal_get_path('module', 'media_ckeditor') . '/js/media_ckeditor.format_form.js';
51
}
52

  
53
/**
54
 * Implements hook_media_browser_params_alter().
55
 */
56
function media_ckeditor_media_browser_params_alter(&$stored_params) {
57
  // We add this custom param when the media dialog is invoked in library.js
58
  if (isset($stored_params['id']) && $stored_params['id'] == 'media_wysiwyg') {
59
    // Set the default browser params from settings form if not already set.
60
    if (empty($stored_params['enabledPlugins'])) {
61
      $stored_params['enabledPlugins'] = variable_get('media_wysiwyg_wysiwyg_browser_plugins', array());
62
    }
63
    if (empty($stored_params['file_directory'])) {
64
      $stored_params['file_directory'] = variable_get('media_wysiwyg_wysiwyg_upload_directory', '');
65
    }
66
    if (empty($stored_params['types'])) {
67
      $stored_params['types'] = variable_get('media_wysiwyg_wysiwyg_allowed_types', array('audio', 'image', 'video', 'document'));
68
    }
69
  }
70
}
71

  

Formats disponibles : Unified diff