Skip to content

Commit

Permalink
Ready to release 3.6.0 on wp.org
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Lannoy committed Oct 23, 2023
1 parent 9128ce7 commit 0c0592e
Show file tree
Hide file tree
Showing 17 changed files with 1,680 additions and 482 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ All notable changes to **Device Detector** are documented in this *changelog*.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and **Device Detector** adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.6.0] - Not Yet Released
## [3.6.0] - 2023-10-25

### Added
- Compatibility with WordPress 6.4.

### Changed
- Upgraded UDD from version 6.1.3 to version 6.1.6: dozens of added and improved detections.

### Fixed
- With PHP 8.2, in some edge cases, deprecation warnings may be triggered when viewing analytics.
Expand Down
2 changes: 1 addition & 1 deletion device-detector.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Plugin Name: Device Detector
* Plugin URI: https://perfops.one/device-detector
* Description: Full featured analytics reporting and management tool that detects all devices accessing your WordPress site.
* Version: 3.5.0
* Version: 3.6.0
* Requires at least: 5.2
* Requires PHP: 7.2
* Author: Pierre Lannoy / PerfOps One
Expand Down
18 changes: 14 additions & 4 deletions includes/libraries/udd/DeviceDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class DeviceDetector
/**
* Current version number of DeviceDetector
*/
public const VERSION = '6.1.3';
public const VERSION = '6.1.6';

/**
* Constant used as value for unknown browser / os
Expand Down Expand Up @@ -931,6 +931,13 @@ protected function parseDevice(): void
$this->brand = 'Apple';
}

/**
* All devices containing VR fragment are assumed to be a wearable
*/
if (null === $this->device && $this->matchUserAgent(' VR ')) {
$this->device = AbstractDeviceParser::DEVICE_TYPE_WEARABLE;
}

/**
* Chrome on Android passes the device type based on the keyword 'Mobile'
* If it is present the device should be a smartphone, otherwise it's a tablet
Expand Down Expand Up @@ -1029,7 +1036,7 @@ protected function parseDevice(): void
/**
* All devices that contain Andr0id in string are assumed to be a tv
*/
if ($this->matchUserAgent('Andr0id|Android TV|\(lite\) TV')) {
if ($this->matchUserAgent('Andr0id|Android TV|\(lite\) TV|BRAVIA')) {
$this->device = AbstractDeviceParser::DEVICE_TYPE_TV;
}

Expand All @@ -1041,9 +1048,12 @@ protected function parseDevice(): void
}

/**
* Devices running Kylo or Espital TV Browsers are assumed to be a TV
* Devices running Kylo or Espial TV Browsers are assumed to be a TV
*/
if (null === $this->device && \in_array($clientName, ['Kylo', 'Espial TV Browser'])) {
if (\in_array($clientName, [
'Kylo', 'Espial TV Browser', 'LUJO TV Browser', 'LogicUI TV Browser', 'Open TV Browser',
])
) {
$this->device = AbstractDeviceParser::DEVICE_TYPE_TV;
}

Expand Down
16 changes: 14 additions & 2 deletions includes/libraries/udd/Parser/Client/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class Browser extends AbstractClientParser
'AG' => 'ANTGalio',
'AL' => 'Aloha Browser',
'AH' => 'Aloha Browser Lite',
'A8' => 'ALVA',
'AM' => 'Amaya',
'A3' => 'Amaze Browser',
'A5' => 'Amerigo',
Expand All @@ -107,7 +108,7 @@ class Browser extends AbstractClientParser
'A2' => 'Atlas',
'AS' => 'Avast Secure Browser',
'VG' => 'AVG Secure Browser',
'AC' => 'Avira Scout',
'AC' => 'Avira Secure Browser',
'A1' => 'AwoX',
'BA' => 'Beaker Browser',
'BM' => 'Beamrise',
Expand Down Expand Up @@ -137,6 +138,7 @@ class Browser extends AbstractClientParser
'BX' => 'BrowseX',
'BZ' => 'Browzar',
'B7' => 'Browlser',
'4B' => 'BrowsBit',
'BY' => 'Biyubi',
'BF' => 'Byffox',
'B4' => 'BF Browser',
Expand Down Expand Up @@ -307,10 +309,12 @@ class Browser extends AbstractClientParser
'LH' => 'Light',
'L1' => 'Lilo',
'LI' => 'Links',
'LC' => 'LogicUI TV Browser',
'IF' => 'Lolifox',
'LO' => 'Lovense Browser',
'LT' => 'LT Browser',
'LU' => 'LuaKit',
'LJ' => 'LUJO TV Browser',
'LL' => 'Lulumi',
'LS' => 'Lunascape',
'LN' => 'Lunascape Lite',
Expand Down Expand Up @@ -346,6 +350,7 @@ class Browser extends AbstractClientParser
'NB' => 'Nokia Browser',
'NO' => 'Nokia OSS Browser',
'NV' => 'Nokia Ovi Browser',
'N2' => 'Norton Secure Browser',
'NX' => 'Nox Browser',
'N1' => 'NOMone VR Browser',
'NE' => 'NetSurf',
Expand All @@ -356,6 +361,7 @@ class Browser extends AbstractClientParser
'WR' => 'NextWord Browser',
'NT' => 'NTENT Browser',
'OC' => 'Oculus Browser',
'O6' => 'Odd Browser',
'O1' => 'Opera Mini iOS',
'OB' => 'Obigo',
'O2' => 'Odin',
Expand All @@ -380,11 +386,13 @@ class Browser extends AbstractClientParser
'OR' => 'Oregano',
'O0' => 'Origin In-Game Overlay',
'OY' => 'Origyn Web Browser',
'O8' => 'OrNET Browser',
'OV' => 'Openwave Mobile Browser',
'O3' => 'OpenFin',
'O4' => 'Open Browser',
'4U' => 'Open Browser 4U',
'5G' => 'Open Browser fast 5G',
'O7' => 'Open TV Browser',
'OW' => 'OmniWeb',
'OT' => 'Otter Browser',
'PL' => 'Palm Blazer',
Expand All @@ -397,11 +405,13 @@ class Browser extends AbstractClientParser
'2P' => 'Puffin Web Browser',
'PW' => 'Palm WebPro',
'PA' => 'Palmscape',
'P7' => 'Pawxy',
'PE' => 'Perfect Browser',
'P1' => 'Phantom.me',
'PH' => 'Phantom Browser',
'PX' => 'Phoenix',
'PB' => 'Phoenix Browser',
'P8' => 'PICO Browser',
'PF' => 'PlayFree Browser',
'PK' => 'PocketBook Browser',
'PO' => 'Polaris',
Expand All @@ -428,6 +438,7 @@ class Browser extends AbstractClientParser
'RK' => 'Rekonq',
'RM' => 'RockMelt',
'SB' => 'Samsung Browser',
'3L' => 'Samsung Browser Lite',
'SA' => 'Sailfish Browser',
'S8' => 'Seewo Browser',
'SC' => 'SEMC-Browser',
Expand Down Expand Up @@ -588,6 +599,7 @@ class Browser extends AbstractClientParser
'HO', 'A5', 'X1', '18', 'B5', 'B6', 'TC', 'A6', '2X',
'F4', 'YG', 'WR', 'NA', 'DM', '1M', 'A7', 'XN', 'XT',
'XB', 'W1', 'HT', 'B8', 'F5', 'B9', 'WA', 'T0', 'HC',
'O6', 'P7', 'LJ', 'LC', 'O7', 'N2', 'A8', 'P8',
],
'Firefox' => [
'AX', 'BI', 'BF', 'BH', 'BN', 'C0', 'CU', 'EI', 'F1',
Expand Down Expand Up @@ -625,7 +637,7 @@ class Browser extends AbstractClientParser
'O4', 'XO', 'U0', 'B0', 'VA', 'X0', 'A5', 'X1', '18',
'B5', 'B6', 'TC', 'A6', '2X', 'F4', 'YG', 'WR', 'NA',
'DM', '1M', 'A7', 'XN', 'XT', 'XB', 'W1', 'HT', 'B7',
'B9', 'T0', 'I8',
'B9', 'T0', 'I8', 'O6', 'P7', 'O8', '4B', 'A8', 'P8',
];

/**
Expand Down
Loading

0 comments on commit 0c0592e

Please sign in to comment.