The plugin has a small bug when forcing mobile theme to be used. It assumes that the mobile theme to be used is the one configured for iphone in the plugin settings, but thats not always the case. Actually I’m only using a mobile theme for android systems as it is the only device I can test my theme with. After reading the plugin code I found an error on line 53 in the file any-mobile-theme-switcher.php
The line looks like
$amts_mobile_browser = get_option(‘iphone_theme’);
A fast fix is to add an if in front of it to make sure it detects our device:
if(empty($amts_mobile_browser) == true) $amts_mobile_browser = get_option(‘iphone_theme’);
But that won’t work on desktop web browsers as these would default to iphone_theme, thus showing the desktop version again and again.
It would be ideal to be able to change that behaviour in the plugin settings so we can select which theme we want to use when the user wants to force mobile theme and no mobile device can be detected.
Note that this bug is common for every web browser that switched to desktop site once.