Given a URI return TRUE if it is external.

Paramètres

string $uri: The uri.

Return value

bool TRUE if external.

5 calls to advagg_is_external()
advagg_file_create_url dans ./advagg.module
Wrapper around file_create_url() to do post-processing on the created url.
advagg_load_css_stylesheet dans ./advagg.inc
Loads the stylesheet and resolves all @import commands.
advagg_relocate_js_script_rewrite dans advagg_relocate/advagg_relocate.module
Add external.
advagg_relocate_load_stylesheet_external dans advagg_relocate/advagg_relocate.module
Convert external @import statements to be local.
_advagg_build_css_path dans ./advagg.inc
Prefixes all paths within a CSS file for drupal_build_css_cache().

Fichier

./advagg.module, line 6293

Code

function advagg_is_external($uri) {
    $http_pos = strpos($uri, 'http://');
    $https_pos = strpos($uri, 'https://');
    $double_slash_pos = strpos($uri, '//');
    if ($http_pos !== 0 && $https_pos !== 0 && $double_slash_pos !== 0) {
        return FALSE;
    }
    return TRUE;
}