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