Révision 18596a08
Ajouté par Assos Assos il y a presque 7 ans
drupal7/sites/all/modules/media/modules/media_wysiwyg/includes/media_wysiwyg.pages.inc | ||
---|---|---|
104 | 104 |
'#default_value' => $align_default, |
105 | 105 |
); |
106 | 106 |
} |
107 |
|
|
108 | 107 |
// Add fields from the file, so that we can override them if necessary. |
109 | 108 |
$form['options']['fields'] = array(); |
110 | 109 |
foreach ($fields as $field_name => $field_value) { |
111 | 110 |
$file->{$field_name} = $field_value; |
112 | 111 |
} |
112 |
// Get the external url from the fid array. |
|
113 |
$external_url = empty($query_fields['external_url']) ? NULL : $query_fields['external_url']; |
|
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 |
); |
|
113 | 121 |
field_attach_form('file', $file, $form['options']['fields'], $form_state); |
114 | 122 |
$instance = field_info_instances('file', $file->type); |
115 | 123 |
foreach ($instance as $field_name => $field_value) { |
Formats disponibles : Unified diff
Weekly update of contrib modules