@@ 1053-1066 (lines=14) @@ | ||
1050 | /* |
|
1051 | is_webkit() can be used to check the User Agent for an webkit generic browser |
|
1052 | */ |
|
1053 | static function is_webkit() { |
|
1054 | ||
1055 | if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) |
|
1056 | return false; |
|
1057 | ||
1058 | $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
|
1059 | ||
1060 | $pos_webkit = strpos( $agent, 'webkit' ); |
|
1061 | ||
1062 | if ( $pos_webkit !== false ) |
|
1063 | return true; |
|
1064 | else |
|
1065 | return false; |
|
1066 | } |
|
1067 | ||
1068 | /** |
|
1069 | * Detects if the current browser is the Native Android browser. |
|
@@ 1143-1152 (lines=10) @@ | ||
1140 | * |
|
1141 | * @return boolean true if the browser is Kindle monochrome Native browser otherwise false |
|
1142 | */ |
|
1143 | static function is_kindle_touch( ) { |
|
1144 | if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) |
|
1145 | return false; |
|
1146 | $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
|
1147 | $pos_kindle_touch = strpos( $agent, 'kindle/3.0+' ); |
|
1148 | if ( false !== $pos_kindle_touch && false === self::is_kindle_fire() ) |
|
1149 | return true; |
|
1150 | else |
|
1151 | return false; |
|
1152 | } |
|
1153 | ||
1154 | ||
1155 | // Detect if user agent is the WordPress.com Windows 8 app (used ONLY on the custom oauth stylesheet) |
|
@@ 1156-1166 (lines=11) @@ | ||
1153 | ||
1154 | ||
1155 | // Detect if user agent is the WordPress.com Windows 8 app (used ONLY on the custom oauth stylesheet) |
|
1156 | static function is_windows8_auth( ) { |
|
1157 | if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) |
|
1158 | return false; |
|
1159 | ||
1160 | $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
|
1161 | $pos = strpos( $agent, 'msauthhost' ); |
|
1162 | if ( false !== $pos ) |
|
1163 | return true; |
|
1164 | else |
|
1165 | return false; |
|
1166 | } |
|
1167 | ||
1168 | // Detect if user agent is the WordPress.com Windows 8 app. |
|
1169 | static function is_wordpress_for_win8( ) { |
|
@@ 1169-1179 (lines=11) @@ | ||
1166 | } |
|
1167 | ||
1168 | // Detect if user agent is the WordPress.com Windows 8 app. |
|
1169 | static function is_wordpress_for_win8( ) { |
|
1170 | if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) |
|
1171 | return false; |
|
1172 | ||
1173 | $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
|
1174 | $pos = strpos( $agent, 'wp-windows8' ); |
|
1175 | if ( false !== $pos ) |
|
1176 | return true; |
|
1177 | else |
|
1178 | return false; |
|
1179 | } |
|
1180 | ||
1181 | ||
1182 | /* |