You are here

function _advagg_build_css_arrays_for_rendering in Advanced CSS/JS Aggregation 7.2

Builds the arrays needed for css rendering and caching.

Parameters

bool $skip_alter: (Optional) If set to TRUE, this function skips calling drupal_alter() on css, useful for the aggressive cache.

Return value

array Array contains the 2 arrays used for css.

1 call to _advagg_build_css_arrays_for_rendering()
_advagg_process_html in ./advagg.module
Replacement for template_process_html().

File

./advagg.module, line 1777
Advanced CSS/JS aggregation module.

Code

function _advagg_build_css_arrays_for_rendering($skip_alter = FALSE) {

  // Get the raw CSS variable.
  $raw_css = drupal_add_css();

  // Process and Sort css.
  $full_css = advagg_get_css($raw_css, $skip_alter);

  // Add attached js to drupal_add_js() function.
  if (!empty($full_css['#attached'])) {
    drupal_process_attached($full_css);

    // Remove #attached since it's been added to the javascript array now.
    unset($full_css['#attached']);
  }
  return array(
    $raw_css,
    $full_css,
  );
}