function drupal_js_defaults

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()

File

includes/common.inc, line 4329
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,
    'requires_jquery' => TRUE,
    'scope' => 'header',
    'cache' => TRUE,
    'defer' => FALSE,
    'preprocess' => TRUE,
    'version' => NULL,
    'data' => $data,
  );
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!common.inc/function/drupal_js_defaults/7.x