Given path output uri to that file

Paramètres

$filename_md5: md5 of filename.

$data: data to store.

5 calls to advagg_build_uri()
advagg_check_missing_handler dans ./advagg.install
Check to see if the CSS/JS generator is working.
advagg_missing_regenerate dans includes/missing.inc
regenerates a missing css file.
advagg_process_css dans includes/css.inc
Returns a themed representation of all stylesheets that should be attached to the page.
advagg_process_js dans ./advagg.module
Returns a themed presentation of all JavaScript code for the current page.
_advagg_admin_settings_information dans includes/admin.inc

Fichier

./advagg.module, line 1755

Code

function advagg_build_uri($path) {
    static $hook_file_url_alter = array();
    // If the current path is an absolute path, return immediately.
    $fragments = parse_url($path);
    if (isset($fragments['host'])) {
        return $path;
    }
    $original_path = $path;
    // CDN Support.
    if (module_exists('cdn')) {
        $status = variable_get(CDN_STATUS_VARIABLE, CDN_DISABLED);
        if ($status == CDN_ENABLED || $status == CDN_TESTING && user_access(CDN_PERM_ACCESS_TESTING)) {
            // Alter URL when the file_create_url() patch is not there.
            if (variable_get(CDN_THEME_LAYER_FALLBACK_VARIABLE, FALSE)) {
                cdn_file_url_alter($path);
            }
            else {
                $path = file_create_url($path);
            }
            // Return here if the path was changed above.
            if (strcmp($original_path, $path) != 0) {
                return $path;
            }
        }
    }
    // Other modules besides CDN might want to use hook_file_url_alter.
    if (empty($hook_file_url_alter)) {
        $hook_file_url_alter = module_implements('file_url_alter');
    }
    if (!empty($hook_file_url_alter)) {
        $path = file_create_url($path);
        // Return here if the path was changed above.
        if (strcmp($original_path, $path) != 0) {
            return $path;
        }
    }
    // If nothing was altered then use the drupal default.
    return base_path() . $path;
}