You are here

function advagg_sri_advagg_removed_aggregates in Advanced CSS/JS Aggregation 7.2

Implements hook_advagg_removed_aggregates().

Related topics

File

advagg_sri/advagg_sri.advagg.inc, line 111
Advanced aggregation sri module.

Code

function advagg_sri_advagg_removed_aggregates($kill_list) {
  foreach ($kill_list as $uri) {
    if (is_object($uri) && property_exists($uri, 'uri')) {
      $temp = $uri->uri;
      unset($uri);
      $uri = $temp;
    }

    // Skip gzip/brotli files.
    $ext = strtolower(pathinfo($uri, PATHINFO_EXTENSION));
    if ($ext === 'gz' || $ext === 'br') {
      continue;
    }
    $filename = basename($uri);
    advagg_sri_del_filename_hashes($filename);
  }
}