drupal_js_defaults

Definition

drupal_js_defaults($data = NULL)
drupal/includes/common.inc, line 2474

Description

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

@see drupal_get_js() @see drupal_add_js()

Parameters

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

Code

function drupal_js_defaults($data = NULL) {
  return array(
    'type' => 'file',
    'weight' => JS_DEFAULT,
    'scope' => 'header',
    'cache' => TRUE,
    'defer' => FALSE,
    'preprocess' => TRUE,
    'data' => $data,
  );
}