function _resp_img_get_device_pixel_ratio in Responsive images and styles 7
1 call to _resp_img_get_device_pixel_ratio()
- resp_img_get_best_suffix in ./
resp_img.module - Determine best match
File
- ./
resp_img.module, line 189
Code
function _resp_img_get_device_pixel_ratio() {
static $ratio = FALSE;
if ($ratio === FALSE && variable_get('resp_img_use_device_pixel_ratio', FALSE) && isset($_COOKIE[RESP_IMG_RATIO_COOKIE]) && is_numeric($_COOKIE[RESP_IMG_RATIO_COOKIE])) {
$ratio = $_COOKIE[RESP_IMG_RATIO_COOKIE];
}
else {
$ratio = 1;
}
return $ratio;
}