You are here

function scald_youtube_add_defer_video_plugin_js in Scald YouTube 7

A function in order to pass the JS file to the ckeditor plugin.

Parameters

array $element: The element array.

Return value

array Return the text format element with a settings in order to add the JS file.

1 string reference to 'scald_youtube_add_defer_video_plugin_js'
scald_youtube_element_info_alter in ./scald_youtube.module
Implements hook_element_info_alter().

File

./scald_youtube.module, line 801
Defines a YouTube provider for Scald.

Code

function scald_youtube_add_defer_video_plugin_js($element) {
  global $base_url, $base_path;
  $element['#attached']['js'][] = array(
    'type' => 'setting',
    'data' => array(
      'defer_youtube_video_js_library' => $base_url . $base_path . drupal_get_path('module', 'scald_youtube') . '/js/scald_youtube_defer_library.js',
    ),
  );
  return $element;
}