You are here

function advagg_context_switch in Advanced CSS/JS Aggregation 7.2

Changes context when generating CSS or JS files.

Parameters

array $aggregate_settings: Array of settings.

int $mode: Use 0 to change context to what is inside of $aggregate_settings. Use 1 to change context back.

2 calls to advagg_context_switch()
advagg_generate_location_uri in ./advagg.missing.inc
Given the filename, type, and settings, create absolute URL for 307 redirect.
advagg_load_css_stylesheet in ./advagg.inc
Loads the stylesheet and resolves all @import commands.

File

./advagg.inc, line 1708
Advanced CSS/JS aggregation module.

Code

function advagg_context_switch(array $aggregate_settings, $mode) {
  $original =& drupal_static(__FUNCTION__);

  // Use current $aggregate_settings if none was passed in.
  if (empty($aggregate_settings)) {
    $aggregate_settings = advagg_current_hooks_hash_array();
  }

  // Call hook_advagg_context_alter().
  drupal_alter('advagg_context', $original, $aggregate_settings, $mode);
}