New Zenner
- Join Date:
- Apr 2011
- Location:
- Espoo, Finland
- Posts:
- 73
- Plugin Contributions:
- 0
MobileDetect class in Common Template html header
Good day,
This seems to be a very minor issue, and moreover, everything is probably Ok in fact and it's me, who does not understand something, but I'd like to wonder anyway, if this code is correct?
// ZCAdditions.com, ZCA Responsive Template Default (BOF-addition 1 of 2)
if (!class_exists('MobileDetect')) {
include_once(DIR_WS_CLASSES . 'Mobile_Detect.php');
}
$detect = new Detection\MobileDetect;
$isMobile = $detect->isMobile();
$isTablet = $detect->isTablet();
if (!isset($layoutType)) $layoutType = ($isMobile ? ($isTablet ? 'tablet' : 'mobile') : 'default');
// ZCAdditions.com, ZCA Responsive Template Default (BOF-addition 1 of 2)
(lines ##32...40 of includes\templates\responsive_classic\common\html_header.php file in newest v2.1.0)