[wp-trac] [WordPress Trac] #33704: Deprecate wp_is_mobile()
WordPress Trac
noreply at wordpress.org
Thu Sep 3 09:29:48 UTC 2015
#33704: Deprecate wp_is_mobile()
-------------------------+--------------------------------------
Reporter: johnbillion | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.4
Severity: normal | Keywords: needs-patch dev-feedback
Focuses: ui |
-------------------------+--------------------------------------
User agent sniffing is bad. `wp_is_mobile()` isn't very reliable. In core
it's actually used to detect if the device is a touch device (so that,
among other things, elements that normally appear on hover are shown
persistently and JavaScript for touch functionality is loaded).
We should audit the use of `wp_is_mobile()` in core to see if replacing it
in favour of client-side feature detection is possible. If so,
`wp_is_mobile()` should be deprecated.
Reported bugs with `wp_is_mobile()`: #24541, #21667, #24252.
History: #20014
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33704>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list