|
@@ 1075-1088 (lines=14) @@
|
| 1072 |
|
/* |
| 1073 |
|
is_webkit() can be used to check the User Agent for an webkit generic browser |
| 1074 |
|
*/ |
| 1075 |
|
static function is_webkit() { |
| 1076 |
|
|
| 1077 |
|
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) |
| 1078 |
|
return false; |
| 1079 |
|
|
| 1080 |
|
$agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
| 1081 |
|
|
| 1082 |
|
$pos_webkit = strpos( $agent, 'webkit' ); |
| 1083 |
|
|
| 1084 |
|
if ( $pos_webkit !== false ) |
| 1085 |
|
return true; |
| 1086 |
|
else |
| 1087 |
|
return false; |
| 1088 |
|
} |
| 1089 |
|
|
| 1090 |
|
/** |
| 1091 |
|
* Detects if the current browser is the Native Android browser. |
|
@@ 1165-1174 (lines=10) @@
|
| 1162 |
|
* |
| 1163 |
|
* @return boolean true if the browser is Kindle monochrome Native browser otherwise false |
| 1164 |
|
*/ |
| 1165 |
|
static function is_kindle_touch( ) { |
| 1166 |
|
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) |
| 1167 |
|
return false; |
| 1168 |
|
$agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
| 1169 |
|
$pos_kindle_touch = strpos( $agent, 'kindle/3.0+' ); |
| 1170 |
|
if ( false !== $pos_kindle_touch && false === self::is_kindle_fire() ) |
| 1171 |
|
return true; |
| 1172 |
|
else |
| 1173 |
|
return false; |
| 1174 |
|
} |
| 1175 |
|
|
| 1176 |
|
|
| 1177 |
|
// Detect if user agent is the WordPress.com Windows 8 app (used ONLY on the custom oauth stylesheet) |
|
@@ 1178-1188 (lines=11) @@
|
| 1175 |
|
|
| 1176 |
|
|
| 1177 |
|
// Detect if user agent is the WordPress.com Windows 8 app (used ONLY on the custom oauth stylesheet) |
| 1178 |
|
static function is_windows8_auth( ) { |
| 1179 |
|
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) |
| 1180 |
|
return false; |
| 1181 |
|
|
| 1182 |
|
$agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
| 1183 |
|
$pos = strpos( $agent, 'msauthhost' ); |
| 1184 |
|
if ( false !== $pos ) |
| 1185 |
|
return true; |
| 1186 |
|
else |
| 1187 |
|
return false; |
| 1188 |
|
} |
| 1189 |
|
|
| 1190 |
|
// Detect if user agent is the WordPress.com Windows 8 app. |
| 1191 |
|
static function is_wordpress_for_win8( ) { |
|
@@ 1191-1201 (lines=11) @@
|
| 1188 |
|
} |
| 1189 |
|
|
| 1190 |
|
// Detect if user agent is the WordPress.com Windows 8 app. |
| 1191 |
|
static function is_wordpress_for_win8( ) { |
| 1192 |
|
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) |
| 1193 |
|
return false; |
| 1194 |
|
|
| 1195 |
|
$agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
| 1196 |
|
$pos = strpos( $agent, 'wp-windows8' ); |
| 1197 |
|
if ( false !== $pos ) |
| 1198 |
|
return true; |
| 1199 |
|
else |
| 1200 |
|
return false; |
| 1201 |
|
} |
| 1202 |
|
|
| 1203 |
|
|
| 1204 |
|
// Detect if user agent is the WordPress.com Desktop app. |