You are here

function advagg_mod_loadcss_js_defaults in Advanced CSS/JS Aggregation 7.2

Get the default loadcss options for the js used.

Return value

array Key => value options array for drupal_add_js().

3 calls to advagg_mod_loadcss_js_defaults()
advagg_mod_add_loadcss_js_lib in advagg_mod/advagg_mod.module
Adds the loadcss js library if needed.
advagg_mod_libraries_info in advagg_mod/advagg_mod.module
Implements hook_libraries_info().
advagg_mod_libraries_preload_callback in advagg_mod/advagg_mod.module
Callback right before loadcss lib is loaded; set defaults.

File

advagg_mod/advagg_mod.module, line 1543
Advanced aggregation modifier module.

Code

function advagg_mod_loadcss_js_defaults() {
  list(, , , , , , , , , , $css_defer) = advagg_mod_get_lists();
  $default_options = array(
    'scope' => $css_defer >= 7 ? 'footer' : 'header',
    'scope_lock' => TRUE,
    'every_page' => TRUE,
    'group' => $css_defer == 1 ? JS_LIBRARY - 1 : JS_LIBRARY,
    'weight' => $css_defer == 1 ? -50000 : 0,
    'movable' => $css_defer == 1 ? FALSE : TRUE,
  );
  return $default_options;
}