Allow other modules to alter css and js paths.

Paramètres

array $css_paths: Array containing the local path and url path.

array $js_paths: Array containing the local path and url path.

Voir aussi

advagg_get_root_files_dir()

advagg_mod_advagg_get_root_files_dir_alter()

Sujets associés

Fichier

./advagg.api.php, line 176

Code

function hook_advagg_get_root_files_dir(array &$css_paths, array &$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]);
}