function _royalslider_image_style in RoyalSlider Integration 7
Remote Stream Wrapper-aware helper function to apply Drupal image styles to image URIs.
Parameters
string: The image style we want to apply.
string: The image's URI.
Return value
string The image's path.
1 call to _royalslider_image_style()
- royalslider_preprocess_royalslider_item in theme/
royalslider.theme.inc - Implements hook_preprocess_HOOK().
File
- theme/
royalslider.theme.inc, line 198 - Theme functions for RoyalSlider.
Code
function _royalslider_image_style($image_style, $uri) {
// Compatibility with Remote Stream Wrapper.
static $remote_stream_wrapper;
if (!isset($remote_stream_wrapper)) {
$remote_stream_wrapper = module_exists('remote_stream_wrapper');
}
if ($remote_stream_wrapper) {
$path = file_is_scheme_remote(file_uri_scheme($uri)) ? remote_stream_wrapper_image_style_path($image_style, $uri) : image_style_url($image_style, $uri);
}
else {
$path = image_style_url($image_style, $uri);
}
return $path;
}