[wp-trac] [WordPress Trac] #24541: wp_is_mobile() includes tablets
WordPress Trac
noreply at wordpress.org
Thu Sep 3 07:48:39 UTC 2015
#24541: wp_is_mobile() includes tablets
--------------------------+------------------------------
Reporter: Looimaster | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.4
Severity: normal | Resolution:
Keywords: close | Focuses:
--------------------------+------------------------------
Changes (by swissspidy):
* keywords: 2nd-opinion => close
Comment:
The function description of `wp_is_mobile()` is very clear:
> Test if the current browser runs on a mobile device (smart phone,
tablet, etc.)
Generally speaking, user-agent sniffing is considered bad practice and
should be avoided whenever possible. On the client side, there are great
libraries like Modernizr which you can use to test for availability of
individual ''features'', not ''browsers''.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/24541#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list