You are here

function media_attach_browser_js in D7 Media 7

Attaches media browser javascript to an element.

Parameters

$element: The element array to attach to.

3 calls to media_attach_browser_js()
media_admin in includes/media.admin.inc
Display the list or thumbnails media admin display.
media_browser_testbed in includes/media.browser.inc
Menu callback for testing the media browser
media_element_process in ./media.module
#process callback for the media form element.

File

includes/media.browser.inc, line 267
Media Browser page callback

Code

function media_attach_browser_js(&$element) {
  $javascript = media_browser_js();
  foreach ($javascript as $key => $definitions) {
    foreach ($definitions as $definition) {
      $element['#attached'][$key][] = $definition;
    }
  }
}