You are here

public function CSSCompression_Cleanup::cleanup in Advanced CSS/JS Aggregation 7

Same name and namespace in other branches
  1. 6 advagg_css_compress/css-compressor-3.x/src/lib/Cleanup.inc \CSSCompression_Cleanup::cleanup()

Central cleanup process, removes all injections

Parameters

(array) selectors: Array of selectors:

(array) details: Array of details:

1 call to CSSCompression_Cleanup::cleanup()
CSSCompression_Cleanup::access in advagg_css_compress/css-compressor-3.x/src/lib/Cleanup.inc
Access to private methods for testing

File

advagg_css_compress/css-compressor-3.x/src/lib/Cleanup.inc, line 105

Class

CSSCompression_Cleanup
CSS Compressor [VERSION] [DATE] Corey Hart @ http://www.codenothing.com

Code

public function cleanup(&$selectors, &$details) {
  foreach ($details as $i => &$value) {

    // Auto skip sections
    if (isset($selectors[$i]) && strpos($selectors[$i], $this->token) === 0) {
      continue;
    }

    // Removing dupes
    if ($this->options['rm-multi-define']) {
      $value = $this
        ->removeMultipleDefinitions($value);
    }
    $value = $this
      ->removeUnnecessarySemicolon($value);
  }
  return array(
    $selectors,
    $details,
  );
}