Ready to get started?Download WordPress


Mobile Smart
Need current theme name, but get_current_theme() shows the desktop theme (1 post)

  1. rlgrobert
    Posted 2 years ago #

    Thank you for the great plugin. I have another unrelated plugin I am working on. However, the behavior this other plugin provides will change depending on which theme is currently being displayed. That is, on the "desktop" version it will do one thing, but on devices using the "mobile" theme, it will need to do something slightly different.

    I found the get_current_theme() function, but it always displays the activated (desktop) theme, even when Mobile Smart is serving the mobile theme.

    I saw there are functions such as, "$mobile_smart->switcher_isMobile()," but I don't want to couple my plugin too closely with others. Is there another way to programmatically detect the theme that is actually being displayed?


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic