Switch link error solution.

Home Forums Any Mobile Theme Switcher Switch link error solution.

This topic contains 1 reply, has 2 voices, and was last updated by  Dinesh 2 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #2927


    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.



    Hi Almamu,

    I know it is illogical to say. But for most cases iphone and Android devices share same theme.

    But i will definitely study about this and add the option if it is flexible.


Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Switch link error solution.’ is closed to new replies.