Same name in other branches
  1. 8.x-2.x advagg.module \advagg_css_in_js()

Returns TRUE if the CSS is being loaded via JavaScript.

Paramètres

object $css_cache: Cache object from cache_get().

Return value

bool TRUE if CSS loaded via JS. FALSE if not.

2 calls to advagg_css_in_js()
advagg_get_render_cache dans ./advagg.module
Given the full css and js scope array return back the render cache.
_advagg_process_html dans ./advagg.module
Replacement for template_process_html().
1 string reference to 'advagg_css_in_js'
advagg.module dans ./advagg.module
Advanced CSS/JS aggregation module.

Fichier

./advagg.module, line 1859

Code

function advagg_css_in_js($css_cache = NULL) {
    if (module_exists('advagg_mod') && variable_get('advagg_mod_css_defer', ADVAGG_MOD_CSS_DEFER)) {
        return TRUE;
    }
    if (module_exists('css_delivery') && css_delivery_enabled()) {
        return TRUE;
    }
    // Critical css added by another means.
    if (!empty($css_cache->data[1]['#items'])) {
        foreach ($css_cache->data[1]['#items'] as $values) {
            if (!empty($values['critical-css'])) {
                return TRUE;
            }
        }
    }
    return variable_get('advagg_css_in_js', ADVAGG_CSS_IN_JS);
}