function advagg_css_cdn_css_alter

cis7 advagg_css_cdn.module advagg_css_cdn_css_alter(&$css)
cle7 advagg_css_cdn.module advagg_css_cdn_css_alter(&$css)
elmsmedia7 advagg_css_cdn.module advagg_css_cdn_css_alter(&$css)
icor7 advagg_css_cdn.module advagg_css_cdn_css_alter(&$css)
meedjum_blog7 advagg_css_cdn.module advagg_css_cdn_css_alter(&$css)
mooc7 advagg_css_cdn.module advagg_css_cdn_css_alter(&$css)

Implements hook_css_alter().

File

sites/all/modules/ulmus/advagg/advagg_css_cdn/advagg_css_cdn.module, line 21
Advanced aggregation js cdn module.

Code

function advagg_css_cdn_css_alter(&$css) {
  // Only modify if jquery_update is not enabled,
  if (module_exists('jquery_update')) {
    return;
  }

  // Setup variables.
  // jquery ui.
  $jquery_ui_version = variable_get('advagg_css_cdn_jquery_ui_version', ADVAGG_CSS_CDN_JQUERY_UI_VERSION);
  $ui_mapping = advagg_css_cdn_get_ui_mapping();
  $add_in_ui = FALSE;

  foreach ($css as $name => $values) {
    // @ignore sniffer_commenting_inlinecomment_spacingbefore:4
    // @ignore sniffer_whitespace_openbracketspacing_openingwhitespace:8
    // Only modify if
    //  advagg_css_cdn_jquery_ui is enabled,
    //  name is in the $ui_mapping array.
    //  and type is file.
    if (variable_get('advagg_css_cdn_jquery_ui', ADVAGG_CSS_CDN_JQUERY_UI) && array_key_exists($name, $ui_mapping) && $css[$name]['type'] == 'file') {
      $css[$name]['data'] = '//ajax.googleapis.com/ajax/libs/jqueryui/' . $jquery_ui_version . '/themes/base/jquery.' . $ui_mapping[$name] . '.css';
      $css[$name]['type'] = 'external';

      // Fallback can not work do to "SecurityError: The operation is insecure."
    }
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.