Skip to content

Change is_iphone so that it doesn't detect iPad #21

@bummzack

Description

@bummzack

I think the is_iphone method should be rewritten to:

return (preg_match('/(ipod;|iphone;)/i', $_SERVER['HTTP_USER_AGENT'])) ? true : false;

By adding the semicolons you're making sure that you match the "correct" part of the user-agent string (the user-agent string also contains iphone on an iPad somewhere, but by adding the semicolon ensures you capture the right part).

I've read the other issues/change requests regarding different templates for different devices and I support that idea. Since iPad and iPhone are quite different when it comes to screen-estate and browsing behavior, iPad should be treated separately or at least not considered to be an iPhone or a "mobile device" at all (hence this issue).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions