From f3d929163f12be7722c2cf033b1ebadbe9a298ff Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Mon, 7 Mar 2022 02:38:01 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@52825 git-svn-id: http://core.svn.wordpress.org/trunk@52414 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/vars.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/vars.php b/wp-includes/vars.php index 6aa98d53aa..f303a9d835 100644 --- a/wp-includes/vars.php +++ b/wp-includes/vars.php @@ -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 ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index d1884f392e..b4dc5bd5e2 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-alpha-52824'; +$wp_version = '6.0-alpha-52825'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.