function drupal_js_defaults

cis7 common.inc drupal_js_defaults($data = NULL)
cle7 common.inc drupal_js_defaults($data = NULL)
elmsmedia7 common.inc drupal_js_defaults($data = NULL)
icor7 common.inc drupal_js_defaults($data = NULL)
meedjum_blog7 common.inc drupal_js_defaults($data = NULL)
mooc7 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()

3 calls to drupal_js_defaults()
adaptivetheme_js_alter in sites/all/themes/ulmus/adaptivetheme/at_core/inc/alter.inc
hook_js_alter()
drupal_add_js in includes/common.inc
Adds a JavaScript file, setting, or inline code to the page.
locale_js_alter in modules/locale/locale.module
Implements hook_js_alter().

File

includes/common.inc, line 4215
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,
  );
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.