WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#15319 closed defect (bug) (wontfix)

Add IE version to browser detection.

Reported by: pross Owned by:
Milestone: Priority: normal
Severity: trivial Version: 3.1
Component: Themes Keywords:
Focuses: Cc:

Description

Allow theme/plugin authors to use specific code depending on Internet Explorer Versions.

$is_IE remains the same true|false.

$is_winIE/$is_macIE returns version number.

Example:

global $is_winIE;
echo $win_IE;

result: 8.0

Attachments (3)

browser.patch (1.2 KB) - added by pross 5 years ago.
browser_v2.patch (1.2 KB) - added by pross 5 years ago.
browser_v3.patch (1.9 KB) - added by pross 5 years ago.
removes $is_macIE from deprecated.php too

Download all attachments as: .zip

Change History (7)

@pross5 years ago

comment:1 follow-up: @ericmann5 years ago

Considering IE for Mac was discontinued in 2003 and official support ended in 2005, do we really need to maintain an $is_macIE variable?

Also, IE versions make more sense from a theme (CSS & JS) perspective ... not from a server (PHP) perspective. What's the reasoning for adding an IE version variable to core?

comment:2 in reply to: ↑ 1 @pross5 years ago

Replying to ericmann:

Considering IE for Mac was discontinued in 2003 and official support ended in 2005, do we really need to maintain an $is_macIE variable?

I dont know, I didnt add $is_macIE maybe it should be removed if it is no longer used.

Also, IE versions make more sense from a theme (CSS & JS) perspective ... not from a server (PHP) perspective. What's the reasoning for adding an IE version variable to core?

To enable theme authors to send version specific css, or even different doctypes html5 for example. At least the option would be there.

comment:3 @pross5 years ago

  • Cc pross@… added

New patch: removed $is_macIE and $is_NS4
$is_IE just returns false or version.

@pross5 years ago

@pross5 years ago

removes $is_macIE from deprecated.php too

comment:4 @nacin4 years ago

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

You can check the user agent yourself. No need for this.

Note: See TracTickets for help on using tickets.