Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#26215 closed enhancement (duplicate)

wp_is_mobile: maybe differentiate between tablets and phones

Reported by: iandstewart's profile iandstewart Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.7
Component: General Keywords:
Focuses: Cc:

Description (last modified by iandstewart)

Maybe we should differentiate between tablets and phones. For example in Twenty Fourteen we hide content on phone-sized screens with display none which falsely suggests the content is not loaded -- and it probably shouldn't be. We can't use wp_is_mobile in it's current state to hide it because it doesn't differentiate between tablets and phones. Twenty Fourteen, for example, _does_ show content on tablets even though it doesn't on phones.

The attached patch is a proposal for allowing us to take care of that.

Attachments (1)

809559-wpismobile.diff (1.6 KB) - added by iandstewart 10 years ago.

Download all attachments as: .zip

Change History (5)

#1 @iandstewart
10 years ago

  • Description modified (diff)

#2 @dimadin
10 years ago

wp_is_mobile() shouldn't be used on frontend since it doesn't work when page caching is used. I opened #26221 to address this issue.

#3 @johnbillion
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #24541.

#4 @SergeyBiryukov
10 years ago

  • Version changed from trunk to 3.7
Note: See TracTickets for help on using tickets.