WordPress.org

Ready to get started?Download WordPress

Forums

Device Theme Switcher
[resolved] Undefined Function (9 posts)

  1. Aaron
    Member
    Posted 2 years ago #

    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/

  2. James Mehorter
    Member
    Plugin Author

    Posted 2 years ago #

    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

  3. dionte247
    Member
    Posted 1 year ago #

    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?

  4. James Mehorter
    Member
    Plugin Author

    Posted 1 year ago #

    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.

    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.

    James

  5. dionte247
    Member
    Posted 1 year ago #

    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

  6. James Mehorter
    Member
    Plugin Author

    Posted 1 year ago #

    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

  7. dionte247
    Member
    Posted 1 year ago #

    Thanks! i will test this out today

  8. dionte247
    Member
    Posted 1 year ago #

    works like a charm! awesome work!

  9. James Mehorter
    Member
    Plugin Author

    Posted 1 year ago #

    Excellent! Thanks Dionte247 :D Have a great day.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic