Make WordPress Core

Changeset 52825


Ignore:
Timestamp:
03/07/2022 02:36:01 AM (3 years ago)
Author:
peterwilsoncc
Message:

General: Improve MS Edge user-agent sniff.

Update the $is_edge global to be true if the browser's user-agent contains Edg rather than Edge. Microsoft have dropped an E from the UA string.

Refer to Microsoft's documentation on detecting edge.

Props costdev, abdullahramzan, mukesh27, Boniu91.
Fixes #55297.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/vars.php

    r49108 r52825  
    6666    if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Lynx' ) !== false ) {
    6767        $is_lynx = true;
    68     } elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Edge' ) !== false ) {
     68    } elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Edg' ) !== false ) {
    6969        $is_edge = true;
    7070    } elseif ( stripos( $_SERVER['HTTP_USER_AGENT'], 'chrome' ) !== false ) {
Note: See TracChangeset for help on using the changeset viewer.