| @@ -16,9 +16,9 @@ | ||
| 16 | 16 | * @return bool |
| 17 | 17 | */ |
| 18 | 18 | private function is_tablet() { |
| 19 | 19 | $user_agent = defender_get_data_from_request( 'HTTP_USER_AGENT', 's' ); |
| 20 | - if ( empty( $user_agent ) ) { | |
| 20 | + if ( '' === $user_agent ) { | |
| 21 | 21 | return false; |
| 22 | 22 | } |
| 23 | 23 | /** |
| 24 | 24 | * It doesn't work with IpadOS due to of this: |
| @@ -35,9 +35,9 @@ | ||
| 35 | 35 | * @return bool|string |
| 36 | 36 | */ |
| 37 | 37 | private function is_mobile() { |
| 38 | 38 | $user_agent = defender_get_data_from_request( 'HTTP_USER_AGENT', 's' ); |
| 39 | - if ( empty( $user_agent ) ) { | |
| 39 | + if ( '' === $user_agent ) { | |
| 40 | 40 | return false; |
| 41 | 41 | } |
| 42 | 42 | // Do not use wp_is_mobile() since it doesn't detect ipad/tablet. |
| 43 | 43 | $mobile_patten = '/Mobile|iP(hone|od|ad)|Android|BlackBerry|tablet|IEMobile|Kindle|NetFront|Silk|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune|playbook/i'; |