Automattic\Jetpack\Device_Detection
User_Agent_Info::is_edge_browser()
Detect Edge browser
Method of the class: User_Agent_Info{}
No Hooks.
Return
null
. Nothing (null).
Usage
$result = User_Agent_Info::is_edge_browser();
User_Agent_Info::is_edge_browser() User Agent Info::is edge browser code WPSCache 1.12.4
public static function is_edge_browser() { if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { return false; } if ( false === strpos( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ), 'Edge' ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating. return false; } return true; }