You are here

function magic_js_defaults in Magic 7.2

Same name and namespace in other branches
  1. 7 includes/scripts-experimental.inc \magic_js_defaults()

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

magic_get_js()

magic_add_js()

1 call to magic_js_defaults()
magic_add_js in includes/scripts-experimental.inc
Adds a JavaScript file, setting, or inline code to the page.

File

includes/scripts-experimental.inc, line 393
A file to contain functions for the magic module to abuse.

Code

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