You are here

function css_emimage_advagg_css_alter in CSS Embedded Images 6.2

Implementation of hook_advagg_css_alter().

Given CSS data embed images into it.

File

./css_emimage.module, line 270
CSS Embedded Images module.

Code

function css_emimage_advagg_css_alter($data, $files, $bundle_md5) {
  $type = cache_get($bundle_md5, 'cache_css_emimage_advagg');
  if (!empty($type->data)) {
    $type = $type->data;
  }
  if (empty($type)) {
    return;
  }
  if ($type == 'none' || $type == 'orig') {
    return;
  }
  _css_emimage_text_processor($data, $bundle_md5, $type);

  // Make sure data sent back is not empty.
  // Workaround needed for advagg async mode.
  if (empty($data)) {
    $data = 'html {display:block;}';
  }
}