Merge advagg_mod_css_defer_rel_preload into advagg_mod_css_defer.

Fichier

advagg_mod/advagg_mod.install, line 24

Code

function advagg_mod_update_7201(&$sandbox) {
    // Merge advagg_mod_css_defer_rel_preload into advagg_mod_css_defer.
    $advagg_mod_css_defer = variable_get('advagg_mod_css_defer', ADVAGG_MOD_CSS_DEFER);
    $advagg_mod_css_defer_rel_preload = variable_get('advagg_mod_css_defer_rel_preload', ADVAGG_MOD_CSS_DEFER_REL_PRELOAD);
    variable_del('advagg_mod_css_defer_rel_preload');
    if (!empty($advagg_mod_css_defer) && !empty($advagg_mod_css_defer_rel_preload)) {
        variable_set('advagg_mod_css_defer', 4);
        return t('The advagg_mod_css_defer_rel_preload variable has been deleted. The advagg_mod_css_defer variable has been set to a value of 4 (All in head, use link rel="preload"). You can adjust this value on the <a href="@url">AdvAgg Modifications page</a>', array(
            '@url' => url('admin/config/development/performance/advagg/mod', array(
                'fragment' => 'edit-advagg-mod-css-defer',
            )),
        ));
    }
    else {
        return t('The advagg_mod_css_defer_rel_preload variable has been deleted.');
    }
}