Projet

Général

Profil

Révision 8fa03d70

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

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/media_ckeditor/media_ckeditor.module
47 47
    'data' => array(
48 48
      'media_ckeditor' => array(
49 49
        'fully_rendered_files' => _media_ckeditor_fully_rendered_files_in_wysiwyg(),
50
        'labels' => array(
51
          'settings' => t('Media settings'),
52
          'add' => t('Add media'),
53
        ),
50 54
      ),
51 55
    ),
52 56
    'type' => 'setting',
......
84 88
        'document',
85 89
      ));
86 90
    }
91
    if (empty($stored_params['file_extensions'])) {
92
      $stored_params['file_extensions'] = variable_get('media_wysiwyg_wysiwyg_allowed_file_extensions', array(
93
        'jpg jpeg gif png txt doc docx xls xlsx pdf ppt pptx pps ppsx odt ods odp mp3 mov mp4 m4a m4v mpeg avi ogg oga ogv weba webp webm')
94
      );
95
    }
87 96
  }
88 97
}
89 98

  
......
110 119
function media_ckeditor_pre_render_media($element) {
111 120
  // If the media widget has been configured to have an Insert button, we'll
112 121
  // communicate that information through javascript settings.
113
  if (!isset($element['#entity_type']) && !isset($element['#field_name']) && !isset($element['#bundle'])) {
114
    $instance = FALSE;
122
  if (isset($element['#entity_type']) && isset($element['#field_name']) && isset($element['#bundle'])) {
123
    $instance = field_info_instance($element['#entity_type'], $element['#field_name'], $element['#bundle']);
115 124
  }
116 125
  else {
117
    $instance = field_info_instance($element['#entity_type'], $element['#field_name'], $element['#bundle']);
126
    $instance = FALSE;
118 127
  }
119 128
  if (!empty($instance['settings']['wysiwyg_insert'])) {
120 129
    $element['#attached']['js'][] = array(

Formats disponibles : Unified diff