Projet

Général

Profil

Révision e013fa40

Ajouté par Assos Assos il y a presque 7 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/media/modules/media_wysiwyg/includes/media_wysiwyg.pages.inc
112 112
  // Get the external url from the fid array.
113 113
  $external_url = empty($query_fields['external_url']) ? NULL : $query_fields['external_url'];
114 114
  // Field to attach external url's to files for linking.
115
  $form['options']['external_url'] = array(
116
    '#type' => 'textfield',
117
    '#title' => t('Link Image'),
118
    '#description' => t('Enter a URL to turn the image into a link.'),
119
    '#default_value' => $external_url,
120
  );
115
  if(variable_get('media_wysiwyg_external_link', FALSE)) {
116
    if($file->type == 'image') {
117
      $form['options']['external_url'] = array(
118
        '#type' => 'textfield',
119
        '#title' => t('Link Image'),
120
        '#description' => t('Enter a URL to turn the image into a link.'),
121
        '#default_value' => $external_url,
122
      );
123
    }
124
  }
121 125
  field_attach_form('file', $file, $form['options']['fields'], $form_state);
122 126
  $instance = field_info_instances('file', $file->type);
123 127
  foreach ($instance as $field_name => $field_value) {

Formats disponibles : Unified diff