WordPress.org

Ready to get started?Download WordPress

Forums

PHP Browser Detection
[resolved] Is there a way to check for any non-mobile device? (5 posts)

  1. ransom1337
    Member
    Posted 1 year ago #

    Hello, I'm trying to detect any device that isn't mobile. Is there a way to do this with this plugin?

    Also, my iPad 3 (iOS6) and iPhone4S (iOS6) don't seem to get detected by the is_mobile query, but they do get detected by the is_ipad and is_iphone query. Is there a reason for this?

    Thanks.

    http://wordpress.org/extend/plugins/php-browser-detection/

  2. fancyfiber
    Member
    Posted 1 year ago #

    Hey @ransom1337,

    I don't have those two devices, but I'd like to help you out. Can you go to:
    http://fancyfiber.com/phpinfo.php

    and post the output here and I'll look at the code and see what might be going on and get back to you. There are several little fixes I made to this plugin tonight to fix support for things I needed, and I need to be sure that the site I am working on right now will support those devices as well.

    Thanks!

  3. Mindshare Studios, Inc.
    Member
    Plugin Author

    Posted 1 year ago #

    This should work:

    if(!is_mobile()) {
       // this code is run if the viewer is not on mobile
    };
  4. Kent@MVA
    Member
    Posted 11 months ago #

    Trying to decide if I should install this plugin. I loaded the FancyFiber page above on my iPad2 and the "ismobiledevice" field came up blank.

    Is that a short-coming of the FancyFiber page or the plugin?

  5. fancyfiber
    Member
    Posted 11 months ago #

    I'm sure it is a short-coming of my page, not the plug-in, which usually works quite well. That page has not been updated with the latest version of the required files, which the plug-in has been.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.