function advagg_is_external in Advanced CSS/JS Aggregation 7.2
Given a URI return TRUE if it is external.
Parameters
string $uri: The uri.
Return value
bool TRUE if external.
5 calls to advagg_is_external()
- advagg_file_create_url in ./
advagg.module - Wrapper around file_create_url() to do post-processing on the created url.
- advagg_load_css_stylesheet in ./
advagg.inc - Loads the stylesheet and resolves all @import commands.
- advagg_relocate_js_script_rewrite in advagg_relocate/
advagg_relocate.module - Add external.
- advagg_relocate_load_stylesheet_external in advagg_relocate/
advagg_relocate.module - Convert external @import statements to be local.
- _advagg_build_css_path in ./
advagg.inc - Prefixes all paths within a CSS file for drupal_build_css_cache().
File
- ./
advagg.module, line 6291 - Advanced CSS/JS aggregation module.
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;
}