drupal_js_defaults

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 435
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(),
  );
}
doc_Drupal
2016-10-29 09:03:16
Comments
Leave a Comment

Please login to continue.