[wp-trac] [WordPress Trac] #21667: Add some user agent to wp_is_mobile

WordPress Trac noreply at wordpress.org
Fri Apr 15 15:35:54 UTC 2016


#21667: Add some user agent to wp_is_mobile
-------------------------------------------------+-------------------------
 Reporter:  inpixelitrust                        |       Owner:
     Type:  enhancement                          |  stevenkword
 Priority:  normal                               |      Status:  assigned
Component:  General                              |   Milestone:  Awaiting
 Severity:  normal                               |  Review
 Keywords:  dev-feedback has-patch needs-unit-   |     Version:  3.4.1
  tests                                          |  Resolution:
                                                 |     Focuses:
-------------------------------------------------+-------------------------

Comment (by swissspidy):

 The patch looks reasonable, but a bit more complex.

 In general I wouldn't recommend doing UA sniffing. Should we really
 further encourage a bad practice? Core uses `wp_is_mobile()` only in a few
 places, mostly for historical reasons where touch devices were not
 considered before.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/21667#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list