Allow other modules to modify the contents of individual CSS files.

Called once per file at aggregation time.

Paramètres

string $data: File contents. Depending on settings/modules these may be minified.

array $css_asset: Asset array.

Voir aussi

\Drupal\advagg\Asset\CssCollectionOptimizer::optimize()

Sujets associés

1 function implements hook_advagg_css_contents_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

advagg_mod_advagg_css_contents_alter dans advagg_mod/advagg_mod.advagg.inc
Implements hook_advagg_css_contents_alter().
1 invocation of hook_advagg_css_contents_alter()
CssCollectionOptimizer::optimize dans src/Asset/CssCollectionOptimizer.php

Fichier

./advagg.api.php, line 102

Code

function hook_advagg_css_contents_alter(&$data, array $css_asset) {
    // Remove all font-style rules applying italics.
    preg_replace("/(.*)(font-style\\s*:.*italic)(.*)/m", "\$0 --> \$1 \$3", $data);
}