Title: [Plugin: Device Theme Switcher] Undefined Function
Last modified: August 20, 2016

---

# [Plugin: Device Theme Switcher] Undefined Function

 *  Resolved [Aaron](https://wordpress.org/support/users/akeith2002/)
 * (@akeith2002)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-device-theme-switcher-undefined-function/)
 * Just updated from version 1.5 to 1.6 and I am receiving this error upon viewing
   on a mobile device:
 * Fatal error: Call to undefined function wp_get themes() in/var/www/domains/jhfnstaging.
   com/wp-content/plugins/device-theme-switcher/dts_class_switcher.php online 14
 * I am assuming it is because I am running wp 3.2 although the plugin page says
   it supports 3+.
 * [http://wordpress.org/extend/plugins/device-theme-switcher/](http://wordpress.org/extend/plugins/device-theme-switcher/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [James Mehorter](https://wordpress.org/support/users/jamesmehorter/)
 * (@jamesmehorter)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-device-theme-switcher-undefined-function/#post-2956208)
 * Hi Aaron,
 * I’ll need to release a new version to correct this, thank you for brining it 
   to my attention.
 * If you update to WordPress 3.4 the plugin will work correctly. The wp_get_themes()
   and wp_get_theme() are new to 3.4, so I need to make sure DTS is backwards compatible.
 * James
 *  [dionte247](https://wordpress.org/support/users/dionte247/)
 * (@dionte247)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-device-theme-switcher-undefined-function/#post-2956261)
 * yes im having the same problem… i changed the wp_get_themes() portion through
   out your code to get_themes() but the themes are blank where i have to select
   them in the admin side. i dont want to update to 3.4 because it will break my
   site. Is there a quick fix?
 *  Plugin Author [James Mehorter](https://wordpress.org/support/users/jamesmehorter/)
 * (@jamesmehorter)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-device-theme-switcher-undefined-function/#post-2956262)
 * dionte247,
 * Apologies for the issue you’re running into. DTS is due for a new version release
   in the coming weeks that will correct this. Ultimately, you should never hack
   the core of a plugin, because you’ve introduced a php error (That’s what the 
   blank page is).
 * Please use version 1.5 for now if you’re unable to update to WordPress 3.4. [You can get it here](http://plugins.trac.wordpress.org/browser/device-theme-switcher/tags/1.5).
 * I would also say, if 3.4 ‘breaks your site’ you should correct those issues. 
   The WordPress updates should never break anything unless you’ve [hacked the core](http://websynthesis.com/dont-hack-wordpress-core/).
 * James
 *  [dionte247](https://wordpress.org/support/users/dionte247/)
 * (@dionte247)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-device-theme-switcher-undefined-function/#post-2956263)
 * That didnt work either. Im using WP 3.1 btw,
 * The fields in the drop down are blank when i goto the admin section to select
   the themes i want for hand held and tablet
 *  Plugin Author [James Mehorter](https://wordpress.org/support/users/jamesmehorter/)
 * (@jamesmehorter)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-device-theme-switcher-undefined-function/#post-2956266)
 * Hi Aaron & dionte247,
 * We’ve released a new version of DTS (v1.7) that is completely backwards compatible
   for WordPress versions < 3.4. This update will correct the undefined functions
   issues both of you ran into. Can you both please update to v1.7 and confirm/post
   back here if that corrected the issues you noticed? Thanks!!
 * James
 *  [dionte247](https://wordpress.org/support/users/dionte247/)
 * (@dionte247)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-device-theme-switcher-undefined-function/#post-2956267)
 * Thanks! i will test this out today
 *  [dionte247](https://wordpress.org/support/users/dionte247/)
 * (@dionte247)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-device-theme-switcher-undefined-function/#post-2956268)
 * works like a charm! awesome work!
 *  Plugin Author [James Mehorter](https://wordpress.org/support/users/jamesmehorter/)
 * (@jamesmehorter)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-device-theme-switcher-undefined-function/#post-2956269)
 * Excellent! Thanks Dionte247 😀 Have a great day.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘[Plugin: Device Theme Switcher] Undefined Function’ is closed to new 
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/device-theme-switcher_b8a362.svg)
 * [Plugin Name: Device Theme Switcher](https://wordpress.org/plugins/device-theme-switcher/)
 * [Support Threads](https://wordpress.org/support/plugin/device-theme-switcher/)
 * [Active Topics](https://wordpress.org/support/plugin/device-theme-switcher/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/device-theme-switcher/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/device-theme-switcher/reviews/)

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)
 * [undefined](https://wordpress.org/support/topic-tag/undefined/)

 * 8 replies
 * 3 participants
 * Last reply from: [James Mehorter](https://wordpress.org/support/users/jamesmehorter/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-device-theme-switcher-undefined-function/#post-2956269)
 * Status: resolved