You are here

function cdn_init in CDN 7.2

Same name and namespace in other branches
  1. 6.2 cdn.module \cdn_init()

Implements hook_init().

File

./cdn.module, line 592

Code

function cdn_init() {
  if (!cdn_status_is_enabled()) {
    return;
  }

  // When per-page statistics are enabled, add the CSS that will be used to
  // make these statistics more usable.
  if (variable_get(CDN_STATS_VARIABLE, FALSE) && user_access(CDN_PERM_ACCESS_STATS)) {
    drupal_add_css(drupal_get_path('module', 'cdn') . '/cdn.css', array(
      'every_page' => TRUE,
    ));
  }
}