Projet

Général

Profil

Révision b3ab3446

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/modules/media_wysiwyg/media_wysiwyg.module
17 17
// Functions for features integration.
18 18
require_once dirname(__FILE__) . '/includes/media_wysiwyg.features.inc';
19 19

  
20
/**
21
 * Implements hook_page_build().
22
 */
23
function media_wysiwyg_page_build(&$page) {
24
  // We need to load some minor CSS if media alignment is enabled.
25
  if (variable_get('media_wysiwyg_alignment', FALSE)) {
26
    $page['page_bottom']['media_wysiwyg']['#attached']['css'] = array(
27
      drupal_get_path('module', 'media_wysiwyg') . '/css/media_wysiwyg.base.css' => array(
28
        'every_page' => TRUE,
29
      ),
30
    );
31
  }
32
}
33

  
20 34
/**
21 35
 * Implements hook_hook_info().
22 36
 */
......
103 117
    return $element;
104 118
  }
105 119

  
106
  $tagmap = _media_wysiwyg_generate_tagMap($field['#value']);
120
  $tagmap = array();
107 121

  
108
  if (isset($tagmap)) {
122
  foreach (array('value', 'summary') as $column) {
123
    if (isset($element[$column])) {
124
      $tagmap += _media_wysiwyg_generate_tagMap($element[$column]['#value']);
125
    }
126
  }
127

  
128
  if (!empty($tagmap)) {
109 129
    $element['#attached']['js'][] = array(
110 130
      'data' => array(
111 131
        'tagmap' => $tagmap,
......
286 306
    '#description' => t('When formatting inserted media, allow editable link text to be used in place of the filename. Turn this off if your file view modes handle link formatting.'),
287 307
  );
288 308

  
309
  $form['wysiwyg']['media_wysiwyg_alignment'] = array(
310
    '#type' => 'checkbox',
311
    '#title' => t('Provide alignment option when embedding media'),
312
    '#default_value' => variable_get('media_wysiwyg_alignment', FALSE),
313
    '#description' => t('If checked, there will be an alignment (left/right/center) option when embedding media in a WYSIWYG.'),
314
  );
315

  
289 316
  $form['#submit'][] = 'media_wysiwyg_admin_config_browser_pre_submit';
290 317
}
291 318

  

Formats disponibles : Unified diff