function drupal_aggregate_css

cis7 drupal_aggregate_css(&$css_groups)
cle7 drupal_aggregate_css(&$css_groups)
elmsmedia7 drupal_aggregate_css(&$css_groups)
icor7 drupal_aggregate_css(&$css_groups)
meedjum_blog7 drupal_aggregate_css(&$css_groups)
mooc7 drupal_aggregate_css(&$css_groups)

Default callback to aggregate CSS files and inline content.

Having the browser load fewer CSS files results in much faster page loads than when it loads many small files. This function aggregates files within the same group into a single file unless the site-wide setting to do so is disabled (commonly the case during site development). To optimize download, it also compresses the aggregate files by removing comments, whitespace, and other unnecessary content. Additionally, this functions aggregates inline content together, regardless of the site-wide aggregation setting.


$css_groups: An array of CSS groups as returned by drupal_group_css(). This function modifies the group's 'data' property for each group that is aggregated.

See also




1 call to drupal_aggregate_css()
_advagg_aggregate_css in sites/all/modules/ulmus/advagg/advagg.module
Default callback to aggregate CSS files and inline content.
1 string reference to 'drupal_aggregate_css'
system_element_info in modules/system/system.module
Implements hook_element_info().


includes/, line 3274
Common functions that many Drupal modules will need to reference.


function drupal_aggregate_css(&$css_groups) {
  $preprocess_css = (variable_get('preprocess_css', FALSE) && (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'update'));

  // For each group that needs aggregation, aggregate its items.
  foreach ($css_groups as $key => $group) {
    switch ($group['type']) {
      // If a file group can be aggregated into a single file, do so, and set
      // the group's data property to the file path of the aggregate file.
      case 'file':
        if ($group['preprocess'] && $preprocess_css) {
          $css_groups[$key]['data'] = drupal_build_css_cache($group['items']);
        // Aggregate all inline CSS content into the group's data property.
      case 'inline':
        $css_groups[$key]['data'] = '';
        foreach ($group['items'] as $item) {
          $css_groups[$key]['data'] .= drupal_load_stylesheet_content($item['data'], $item['preprocess']);



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.