You are here

function javascript_aggregator_preprocess_page in Javascript Aggregator 6

Implementation of hook_preprocess_hook().

Minify the aggregated JavaScript file in the page header if JavaScript Optimization is turned on.

1 string reference to 'javascript_aggregator_preprocess_page'
javascript_aggregator_theme_registry_alter in ./javascript_aggregator.module
Implementation of hook_theme_registry_alter().

File

./javascript_aggregator.module, line 70

Code

function javascript_aggregator_preprocess_page(&$variables) {

  // Only do this for pages that have JavaScript on them.
  if (!empty($variables['scripts'])) {
    $variables['scripts'] = _javascript_aggregator_minify($variables['scripts']);
  }
}