drupal_js_defaults

Versions
7
drupal_js_defaults($data = NULL)

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

See also

drupal_get_js()

@see drupal_add_js()

Parameters

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

▾ 2 functions call drupal_js_defaults()

drupal_add_js in includes/common.inc
Add a JavaScript file, setting or inline code to the page.
locale_js_alter in modules/locale/locale.module
Implement hook_js_alter().

Code

includes/common.inc, line 3791

<?php
function drupal_js_defaults($data = NULL) {
  return array(
    'type' => 'file',
    'weight' => JS_DEFAULT,
    'scope' => 'header',
    'cache' => TRUE,
    'defer' => FALSE,
    'preprocess' => TRUE,
    'data' => $data,
  );
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.