Commit 62e374d4 authored by brockfanning's avatar brockfanning Committed by olstjos

Issue #2839952 by brockfanning: link_text set to false when media is inserted in new page

parent 693b0cf7
......@@ -236,7 +236,7 @@ function media_wysiwyg_token_to_markup($match, $wysiwyg = FALSE, $langcode = NUL
'view_mode' => $tag_info['view_mode'],
'link_text' => $tag_info['link_text'],
);
drupal_add_js(array('mediaDataMap' => array($file->fid => $data), 'mediaDoLinkText' => (boolean)(variable_get('media_wysiwyg_use_link_text_for_filename', 1))), 'setting');
drupal_add_js(array('mediaDataMap' => array($file->fid => $data)), 'setting');
$element['#attributes']['data-fid'] = $file->fid;
$element['#attributes']['data-media-element'] = '1';
$element['#attributes']['class'][] = 'media-element';
......
......@@ -142,6 +142,7 @@ function media_wysiwyg_pre_render_text_format($element) {
$element['#attached']['js'][] = array(
'data' => array(
'media' => $settings,
'mediaDoLinkText' => (boolean) variable_get('media_wysiwyg_use_link_text_for_filename', 1),
),
'type' => 'setting',
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment