mirror of
git://develop.git.wordpress.org/
synced 2025-03-21 04:20:01 +01:00
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 [https://docs.microsoft.com/en-us/microsoft-edge/web-platform/user-agent-guidance#identifiers-for-microsoft-edge-on-various-platforms Microsoft's documentation on detecting edge]. Props costdev, abdullahramzan, mukesh27, Boniu91. Fixes #55297. git-svn-id: https://develop.svn.wordpress.org/trunk@52825 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
34d98887a2
commit
177c315c12
@ -65,7 +65,7 @@ $is_edge = false;
|
||||
if ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) {
|
||||
if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Lynx' ) !== false ) {
|
||||
$is_lynx = true;
|
||||
} elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Edge' ) !== false ) {
|
||||
} elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Edg' ) !== false ) {
|
||||
$is_edge = true;
|
||||
} elseif ( stripos( $_SERVER['HTTP_USER_AGENT'], 'chrome' ) !== false ) {
|
||||
if ( stripos( $_SERVER['HTTP_USER_AGENT'], 'chromeframe' ) !== false ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user