8.3.x common.inc drupal_js_defaults($data = NULL)
8.0.x common.inc drupal_js_defaults($data = NULL)
8.1.x common.inc drupal_js_defaults($data = NULL)
8.2.x common.inc drupal_js_defaults($data = NULL)
8.4.x common.inc drupal_js_defaults($data = NULL)
7.x common.inc drupal_js_defaults($data = NULL)

Constructs an array of the defaults that are used for JavaScript assets.

Parameters

$data: (optional) The default data parameter for the JavaScript asset array.

See also

hook_js_alter()

File

core/includes/common.inc, line 436
Common functions that many Drupal modules will need to reference.

Code

function drupal_js_defaults($data = NULL) {
  return array(
    'type' => 'file',
    'group' => JS_DEFAULT,
    'weight' => 0,
    'scope' => 'header',
    'cache' => TRUE,
    'preprocess' => TRUE,
    'attributes' => array(),
    'version' => NULL,
    'data' => $data,
    'browsers' => array(),
  );
}