Opened 6 years ago
Closed 6 years ago
#41023 closed feature request (fixed)
Allow people to change wp_is_mobile logic though a filter
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
Attachments (2)
Change History (6)
#2
@
6 years ago
- Keywords needs-patch removed
I understand the skepticism regarding the subject, one should strive for making websites responsive, but this might not be the only application for this.
For example we have an external caching layer that automatically detects whether a request is coming from a desktop device or a mobile one. All is fine and good until you get to a point when Google recommends that device X should be considered a desktop device while other plugins that alter content might see it as a mobile one and lack a proper mechanism to alter their behavior.
The issue arises when when a uncached resource is requested, the contents of that page will depend on whether the first visitor was by the plugins perspective a mobile device or not, and not necessarily what we think we should be serving. This gets murky fast as some people might want to serve ads or any other content based on the target device.
Let me know if there is anything I could change to make this as standard as possible.
Hey there,
This filter would need to be documented according to our PHP Documentation Standards.
Personally, I think people should rather use feature detection and progressive enhancement instead of using / relying upon
wp_is_mobile()
.