Implements hook_advagg_get_root_files_dir_alter().

Related topics

File

advagg_mod/advagg_mod.module, line 1096

Code

function advagg_mod_advagg_get_root_files_dir_alter(&$css_paths, &$js_paths) {
    $dir = rtrim(variable_get('advagg_mod_unified_multisite_dir', ''), '/');
    if (empty($dir) || !file_exists($dir) || !is_dir($dir)) {
        return;
    }
    // Change directory.
    $css_paths[0] = $dir . '/advagg_css';
    $js_paths[0] = $dir . '/advagg_js';
    file_prepare_directory($css_paths[0], FILE_CREATE_DIRECTORY);
    file_prepare_directory($js_paths[0], FILE_CREATE_DIRECTORY);
    // Set the URI of the directory.
    $css_paths[1] = advagg_get_relative_path($css_paths[0]);
    $js_paths[1] = advagg_get_relative_path($js_paths[0]);
}