Skip navigation
Help

drupal_js_defaults

7 common.inc drupal_js_defaults($data = NULL)

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

Parameters

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

See also

drupal_get_js()

drupal_add_js()

2 calls to drupal_js_defaults()

File

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

Code

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