Projet

Général

Profil

Révision 81b16cc2

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

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/media/modules/media_wysiwyg/includes/media_wysiwyg.filter.inc
238 238
            $settings[$dimension] = $settings['attributes'][$dimension];
239 239
          }
240 240
        }
241
        // If the element is floated via WYSIWYG editor functionality, delegate
242
        // that information to the outer element.
243
        if (!empty($css_properties['float'])) {
244
          $settings['float'] = $css_properties['float'];
245
        }
241 246
      }
242 247
      foreach (array('title', 'alt') as $field_type) {
243 248
        if (isset($settings['attributes'][$field_type])) {
......
331 336
      field_attach_prepare_view('file', array($file->fid => $file), $tag_info['view_mode'], $langcode);
332 337
      entity_prepare_view('file', array($file->fid => $file), $langcode);
333 338
      $element['content'] += field_attach_view('file', $file, $tag_info['view_mode'], $langcode);
339

  
340
      // Add any float information via an extra class
341
      if (!empty($settings['float'])) {
342
        $element['content']['file']['#attributes']['class'][] = drupal_html_class('media-float-' . $settings['float']);
343
      }
334 344
    }
335 345
    if (count(element_children($element['content'])) > 1) {
336 346
      // Add surrounding divs to group them together.
......
342 352
        'media-element-container',
343 353
        'media-' . $element['content']['file']['#view_mode'],
344 354
      );
355
      // Add the float information to the outer element.
356
      if (!empty($settings['float'])) {
357
        $element['content']['#attributes']['class'][] = drupal_html_class('media-float-' . $settings['float']);
358
      }
345 359
      if (variable_get('media_wysiwyg_remove_media_class', FALSE)) {
346 360
        $classes = $element['content']['#attributes']['class'];
347 361
        $element['content']['#attributes']['class'] = array_diff($classes, array('media'));

Formats disponibles : Unified diff