Disable mobile theme when using tablet
Permalink
Hi,
I'm using a mobile theme (on Concrete5 5.6.3.1), but the theme is also activated on tablet. I only want it to be activated when using a mobile.
I have found the following code on concrete5's forum as supposed to be on line 574 in mobile detect.php except I don't see it so I think I use a newer version.
Code in forum:
Code on line 573 > 585:
Any idea how to get this working correcly..
(don't want to use a plugin)
Thank you for your time,
Maarten
I'm using a mobile theme (on Concrete5 5.6.3.1), but the theme is also activated on tablet. I only want it to be activated when using a mobile.
I have found the following code on concrete5's forum as supposed to be on line 574 in mobile detect.php except I don't see it so I think I use a newer version.
Code in forum:
public function isMobile() { return ($this->isMobile && !$this->isTablet()); }
Code on line 573 > 585:
public function isTablet($userAgent = null, $httpHeaders = null) { $this->setDetectionType('mobile'); foreach($this->tabletDevices as $_regex){ if($this->match($_regex, $userAgent)){ return true; } } return false; }
Any idea how to get this working correcly..
(don't want to use a plugin)
Thank you for your time,
Maarten
Can I perhaps use an older version of mobile detect.php?
Hope someone can help me out.