GeoIP Detection - Version 3.1.1

Version Description

  • NEW: Add the possibility to access the ISO-3166 alpha3 version of $record->country: $record->extra->isoCode3 or [geoip_detect2 property="extra.countryIsoCode3"]
  • FIX: The (CF7) shortcode [geoip_detect2_countries] now selects the selected country on page reload (the HTML tag autocomplete is set to off now)
  • FIX: Subnets can now be entered in the preferences of the reverse proxy again (this was a regression of the Admin UI changes in 3.0.3)
  • FIX: Do not log "It has not changed since the last update." as a cron-related error that should be shown to the user.
Download this release

Release Info

Developer benjamin4
Plugin Icon 128x128 GeoIP Detection
Version 3.1.1
Comparing to
See all releases

Code changes from version 3.1.0 to 3.1.1

data-sources/abstract.php CHANGED
@@ -81,7 +81,7 @@ class ExtraInformation extends \GeoIp2\Record\AbstractRecord {
81
  /**
82
  * @ignore
83
  */
84
- protected $validAttributes = array('source', 'cached', 'error', 'original', 'flag', 'tel');
85
  }
86
 
87
  interface ReaderInterface extends \GeoIp2\ProviderInterface {
81
  /**
82
  * @ignore
83
  */
84
+ protected $validAttributes = array('source', 'cached', 'error', 'original', 'flag', 'tel', 'countryIsoCode3');
85
  }
86
 
87
  interface ReaderInterface extends \GeoIp2\ProviderInterface {
data-sources/auto.php CHANGED
@@ -340,5 +340,13 @@ HTML;
340
  }
341
  }
342
 
 
 
 
 
 
 
 
 
343
  geoip_detect2_register_source(new AutoDataSource());
344
 
340
  }
341
  }
342
 
343
+ if (WP_DEBUG && !empty($_GET['test_auto_update_now'])) {
344
+ add_filter('plugins_loaded', function() {
345
+ if (current_user_can('manage_options')) {
346
+ do_action('geoipdetectupdate');
347
+ }
348
+ }, 60);
349
+ };
350
+
351
  geoip_detect2_register_source(new AutoDataSource());
352
 
geoip-detect-lib.php CHANGED
@@ -255,6 +255,9 @@ function _geoip_detect2_add_geonames_data($data) {
255
  if (!empty($data['country']['iso_code'])) {
256
  $geonamesData = $countryInfo->getInformationAboutCountry($data['country']['iso_code']);
257
  $data = array_replace_recursive($geonamesData, $data);
 
 
 
258
 
259
  $emoji = $countryInfo->getFlagEmoji($data['country']['iso_code']);
260
  if ($emoji && empty($data['extra']['flag'])) {
@@ -293,8 +296,18 @@ function geoip_detect_sanitize_ip_list($ip_list) {
293
  $ret = array();
294
  foreach ($list as $ip) {
295
  $ip = trim($ip);
296
- if (!geoip_detect_is_ip($ip))
 
 
 
 
 
 
297
  continue;
 
 
 
 
298
  $ret[] = $ip;
299
  }
300
  return implode(', ', $ret);
255
  if (!empty($data['country']['iso_code'])) {
256
  $geonamesData = $countryInfo->getInformationAboutCountry($data['country']['iso_code']);
257
  $data = array_replace_recursive($geonamesData, $data);
258
+ if (!empty($geonamesData['country']['iso_code3'])) {
259
+ $data['extra']['country_iso_code3'] = $geonamesData['country']['iso_code3'];
260
+ }
261
 
262
  $emoji = $countryInfo->getFlagEmoji($data['country']['iso_code']);
263
  if ($emoji && empty($data['extra']['flag'])) {
296
  $ret = array();
297
  foreach ($list as $ip) {
298
  $ip = trim($ip);
299
+ $parts = explode('/', $ip, 2);
300
+ if (isset($parts[1])) {
301
+ if (!is_numeric($parts[1])) {
302
+ unset($parts[1]);
303
+ }
304
+ }
305
+ if (!geoip_detect_is_ip($parts[0])) {
306
  continue;
307
+ }
308
+
309
+ $ip = $parts[0] . (isset($parts[1]) ? ('/' . (int) $parts[1]) : '');
310
+
311
  $ret[] = $ip;
312
  }
313
  return implode(', ', $ret);
geoip-detect.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.yellowtree.de
5
  Description: Retrieving Geo-Information using the Maxmind GeoIP (Lite) Database.
6
  Author: Yellow Tree (Benjamin Pick)
7
  Author URI: http://www.yellowtree.de
8
- Version: 3.1.0
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
  Text Domain: geoip-detect
@@ -16,7 +16,7 @@ Requires WP: 4.0
16
  Requires PHP: 5.6
17
  */
18
 
19
- define('GEOIP_DETECT_VERSION', '3.1.0');
20
 
21
  /*
22
  Copyright 2013-2020 Yellow Tree, Siegen, Germany
5
  Description: Retrieving Geo-Information using the Maxmind GeoIP (Lite) Database.
6
  Author: Yellow Tree (Benjamin Pick)
7
  Author URI: http://www.yellowtree.de
8
+ Version: 3.1.1
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
  Text Domain: geoip-detect
16
  Requires PHP: 5.6
17
  */
18
 
19
+ define('GEOIP_DETECT_VERSION', '3.1.1');
20
 
21
  /*
22
  Copyright 2013-2020 Yellow Tree, Siegen, Germany
lib/geonames/data/country-info.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- // Generated at Wed, 18 Sep 2019 12:09:48 +0200
3
  return array (
4
  'countries' =>
5
  array (
@@ -46,7 +46,7 @@ return array (
46
  'fr' => 'Émirats Arabes Unis',
47
  'ja' => 'アラブ首長国連邦',
48
  'pt-BR' => 'Emirados Árabes Unidos',
49
- 'ru' => 'Оаэ',
50
  'zh-CN' => '阿拉伯联合酋长国',
51
  ),
52
  ),
@@ -691,7 +691,7 @@ return array (
691
  'de' => 'St. Barthélemy',
692
  'it' => 'San Bartolomeo',
693
  'es' => 'San Bartolomé',
694
- 'fr' => 'Saint-Barthélémy',
695
  'ja' => 'サン・バルテルミー',
696
  'pt-BR' => 'São Bartolomeu',
697
  'ru' => 'Остров Святого Бартоломея',
@@ -795,7 +795,7 @@ return array (
795
  'geoname_id' => 7626844,
796
  'names' =>
797
  array (
798
- 'en' => 'Bonaire',
799
  'de' => 'Bonaire',
800
  'it' => 'Caraibi Olandesi',
801
  'es' => 'Bonaire',
@@ -880,7 +880,7 @@ return array (
880
  'de' => 'Bhutan',
881
  'it' => 'Bhutan',
882
  'es' => 'Bután',
883
- 'fr' => 'Bhutan',
884
  'ja' => 'ブータン王国',
885
  'pt-BR' => 'Butão',
886
  'ru' => 'Бутан',
@@ -1065,10 +1065,10 @@ return array (
1065
  'geoname_id' => 203312,
1066
  'names' =>
1067
  array (
1068
- 'en' => 'Democratic Republic of the Congo',
1069
- 'de' => 'Demokratische Republik Kongo',
1070
  'it' => 'Repubblica Democratica del Congo',
1071
- 'es' => 'República Democrática del Congo',
1072
  'fr' => 'RDC',
1073
  'ja' => 'コンゴ民主共和国',
1074
  'pt-BR' => 'Congo-Kinshasa',
@@ -1119,7 +1119,7 @@ return array (
1119
  'geoname_id' => 2260494,
1120
  'names' =>
1121
  array (
1122
- 'en' => 'Republic of the Congo',
1123
  'de' => 'Kongo (Republik Kongo)',
1124
  'it' => 'Congo',
1125
  'es' => 'Congo [República]',
@@ -1390,7 +1390,7 @@ return array (
1390
  'names' =>
1391
  array (
1392
  'en' => 'Cabo Verde',
1393
- 'de' => 'Kap Verde',
1394
  'it' => 'Capo Verde',
1395
  'es' => 'Cabo Verde',
1396
  'fr' => 'Cap-Vert',
@@ -1416,7 +1416,7 @@ return array (
1416
  'geoname_id' => 7626836,
1417
  'names' =>
1418
  array (
1419
- 'en' => 'Curacao',
1420
  'de' => 'Curaçao',
1421
  'it' => 'Curacao',
1422
  'es' => 'Curazao',
@@ -1499,11 +1499,11 @@ return array (
1499
  array (
1500
  'en' => 'Czechia',
1501
  'de' => 'Tschechien',
1502
- 'it' => 'Repubblica Ceca',
1503
  'es' => 'República Checa',
1504
  'fr' => 'République tchèque',
1505
  'ja' => 'チェコ共和国',
1506
- 'pt-BR' => 'República Checa',
1507
  'ru' => 'Чешская Республика',
1508
  'zh-CN' => '捷克共和国',
1509
  ),
@@ -1633,7 +1633,7 @@ return array (
1633
  'names' =>
1634
  array (
1635
  'en' => 'Dominican Republic',
1636
- 'de' => 'Dominikanische Republik',
1637
  'it' => 'Repubblica Dominicana',
1638
  'es' => 'República Dominicana',
1639
  'fr' => 'République Dominicaine',
@@ -1985,7 +1985,7 @@ return array (
1985
  array (
1986
  'en' => 'Faroe Islands',
1987
  'de' => 'Färöer-Inseln',
1988
- 'it' => 'Isole Fær Øer',
1989
  'es' => 'Islas Feroe',
1990
  'fr' => 'Îles Féroé',
1991
  'ja' => 'フェロー諸島',
@@ -2415,11 +2415,11 @@ return array (
2415
  'geoname_id' => 3474415,
2416
  'names' =>
2417
  array (
2418
- 'en' => 'South Georgia and the South Sandwich Islands',
2419
  'de' => 'Südgeorgien und die Südlichen Sandwichinseln',
2420
  'it' => 'Georgia del Sud e isole Sandwich meridionali',
2421
  'es' => 'Islas Georgia del Sur y Sandwich del Sur',
2422
- 'fr' => 'Géorgie du Sud et les îles Sandwich du Sud',
2423
  'ja' => '南ジョージア島・南サンドイッチ諸島',
2424
  'pt-BR' => 'Geórgia do Sul e Ilhas Sandwich do Sul',
2425
  'ru' => 'Южная Джорджия и Южные Сандвичевы Острова',
@@ -2726,8 +2726,8 @@ return array (
2726
  'continent' => 'AS',
2727
  'location' =>
2728
  array (
2729
- 'latitude' => -2.518722,
2730
- 'longitude' => 118.015568,
2731
  ),
2732
  ),
2733
  'IE' =>
@@ -2807,8 +2807,8 @@ return array (
2807
  'continent' => 'EU',
2808
  'location' =>
2809
  array (
2810
- 'latitude' => 54.23782,
2811
- 'longitude' => -4.555111,
2812
  ),
2813
  ),
2814
  'IN' =>
@@ -3225,7 +3225,7 @@ return array (
3225
  'geoname_id' => 3575174,
3226
  'names' =>
3227
  array (
3228
- 'en' => 'Saint Kitts and Nevis',
3229
  'de' => 'Saint Kitts und Nevis',
3230
  'it' => 'Saint Kitts e Nevis',
3231
  'es' => 'San Cristóbal y Nieves',
@@ -3874,13 +3874,13 @@ return array (
3874
  'names' =>
3875
  array (
3876
  'en' => 'North Macedonia',
3877
- 'de' => 'Ehemalige jugoslawische Republik Mazedonien',
3878
- 'it' => 'Macedonia',
3879
- 'es' => 'Macedonia',
3880
- 'fr' => 'Macédoine',
3881
  'ja' => 'マケドニア旧ユーゴスラビア共和国',
3882
  'pt-BR' => 'Macedônia',
3883
- 'ru' => 'Македония',
3884
  'zh-CN' => '前南斯拉夫马其顿共和国',
3885
  ),
3886
  ),
@@ -3927,7 +3927,7 @@ return array (
3927
  'geoname_id' => 1327865,
3928
  'names' =>
3929
  array (
3930
- 'en' => 'Myanmar [Burma]',
3931
  'de' => 'Birma (Myanmar)',
3932
  'it' => 'Birmania',
3933
  'es' => 'Myanmar [Birmania]',
@@ -4252,7 +4252,7 @@ return array (
4252
  'names' =>
4253
  array (
4254
  'en' => 'Malaysia',
4255
- 'de' => 'Malaysien',
4256
  'it' => 'Malesia',
4257
  'es' => 'Malasia',
4258
  'fr' => 'Malaisie',
@@ -4366,7 +4366,7 @@ return array (
4366
  'fr' => 'Niger',
4367
  'ja' => 'ニジェール共和国',
4368
  'pt-BR' => 'Níger',
4369
- 'ru' => 'Нигер1',
4370
  'zh-CN' => '尼日尔',
4371
  ),
4372
  ),
@@ -4427,8 +4427,8 @@ return array (
4427
  'continent' => 'AF',
4428
  'location' =>
4429
  array (
4430
- 'latitude' => 9.0845755,
4431
- 'longitude' => 8.6742525,
4432
  ),
4433
  ),
4434
  'NI' =>
@@ -5416,7 +5416,7 @@ return array (
5416
  'de' => 'Svalbard und Jan Mayen',
5417
  'it' => 'Svalbard e Jan Mayen',
5418
  'es' => 'Svalbard y Jan Mayen',
5419
- 'fr' => 'Svalbard et Île Jan Mayen',
5420
  'ja' => 'スバールバル諸島・ヤンマイエン島',
5421
  'pt-BR' => 'Svalbard e Jan Mayen',
5422
  'ru' => 'Свальбард и Ян-Майен',
@@ -5848,7 +5848,7 @@ return array (
5848
  'de' => 'Togo',
5849
  'it' => 'Togo',
5850
  'es' => 'Togo',
5851
- 'fr' => 'République Togolaise',
5852
  'ja' => 'トーゴ共和国',
5853
  'pt-BR' => 'Togo',
5854
  'ru' => 'Того',
@@ -6149,7 +6149,7 @@ return array (
6149
  'ja' => '中華民国',
6150
  'pt-BR' => 'Taiwan',
6151
  'ru' => 'Тайвань',
6152
- 'zh-CN' => '台湾',
6153
  ),
6154
  ),
6155
  'continent' => 'AS',
@@ -6283,7 +6283,7 @@ return array (
6283
  'fr' => 'États-Unis',
6284
  'ja' => 'アメリカ合衆国',
6285
  'pt-BR' => 'Estados Unidos',
6286
- 'ru' => 'Сша',
6287
  'zh-CN' => '美国',
6288
  ),
6289
  ),
@@ -6384,11 +6384,11 @@ return array (
6384
  'geoname_id' => 3577815,
6385
  'names' =>
6386
  array (
6387
- 'en' => 'Saint Vincent and the Grenadines',
6388
  'de' => 'St. Vincent und die Grenadinen',
6389
  'it' => 'Saint Vincent e Grenadine',
6390
  'es' => 'San Vicente y las Granadinas',
6391
- 'fr' => 'Saint-Vincent-et-les Grenadines',
6392
  'ja' => 'セントビンセント・グレナディーン諸島',
6393
  'pt-BR' => 'São Vincente e Granadinas',
6394
  'ru' => 'Сент-Винсент и Гренадины',
@@ -6688,7 +6688,7 @@ return array (
6688
  'fr' => 'Afrique du Sud',
6689
  'ja' => '南アフリカ',
6690
  'pt-BR' => 'África do Sul',
6691
- 'ru' => 'Юар',
6692
  'zh-CN' => '南非',
6693
  ),
6694
  ),
@@ -6756,22 +6756,6 @@ return array (
6756
  ),
6757
  'continents' =>
6758
  array (
6759
- 'AS' =>
6760
- array (
6761
- 'code' => 'AS',
6762
- 'names' =>
6763
- array (
6764
- 'en' => 'Asia',
6765
- 'de' => 'Asien',
6766
- 'it' => 'Asia',
6767
- 'es' => 'Asia',
6768
- 'fr' => 'Asie',
6769
- 'ja' => 'アジア',
6770
- 'pt-BR' => 'Ásia',
6771
- 'ru' => 'Азия',
6772
- 'zh-CN' => '亚洲',
6773
- ),
6774
- ),
6775
  'EU' =>
6776
  array (
6777
  'code' => 'EU',
@@ -6788,36 +6772,20 @@ return array (
6788
  'zh-CN' => '欧洲',
6789
  ),
6790
  ),
6791
- 'AF' =>
6792
- array (
6793
- 'code' => 'AF',
6794
- 'names' =>
6795
- array (
6796
- 'en' => 'Africa',
6797
- 'de' => 'Afrika',
6798
- 'it' => 'Africa',
6799
- 'es' => 'África',
6800
- 'fr' => 'Afrique',
6801
- 'ja' => 'アフリカ',
6802
- 'pt-BR' => 'África',
6803
- 'ru' => 'Африка',
6804
- 'zh-CN' => '非洲',
6805
- ),
6806
- ),
6807
- 'OC' =>
6808
  array (
6809
- 'code' => 'OC',
6810
  'names' =>
6811
  array (
6812
- 'en' => 'Oceania',
6813
- 'de' => 'Ozeanien',
6814
- 'it' => 'Oceania',
6815
- 'es' => 'Oceanía',
6816
- 'fr' => 'Océanie',
6817
- 'ja' => 'オセアニア',
6818
- 'pt-BR' => 'Oceania',
6819
- 'ru' => 'Океания',
6820
- 'zh-CN' => '大洋洲',
6821
  ),
6822
  ),
6823
  'NA' =>
@@ -6836,6 +6804,22 @@ return array (
6836
  'zh-CN' => '北美洲',
6837
  ),
6838
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6839
  'AN' =>
6840
  array (
6841
  'code' => 'AN',
@@ -6868,5 +6852,21 @@ return array (
6868
  'zh-CN' => '南美洲',
6869
  ),
6870
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6871
  ),
6872
  );
1
  <?php
2
+ // Generated at Sat, 01 Aug 2020 11:56:09 +0200
3
  return array (
4
  'countries' =>
5
  array (
46
  'fr' => 'Émirats Arabes Unis',
47
  'ja' => 'アラブ首長国連邦',
48
  'pt-BR' => 'Emirados Árabes Unidos',
49
+ 'ru' => 'ОАЭ',
50
  'zh-CN' => '阿拉伯联合酋长国',
51
  ),
52
  ),
691
  'de' => 'St. Barthélemy',
692
  'it' => 'San Bartolomeo',
693
  'es' => 'San Bartolomé',
694
+ 'fr' => 'Saint-Barthélemy',
695
  'ja' => 'サン・バルテルミー',
696
  'pt-BR' => 'São Bartolomeu',
697
  'ru' => 'Остров Святого Бартоломея',
795
  'geoname_id' => 7626844,
796
  'names' =>
797
  array (
798
+ 'en' => 'Bonaire, Sint Eustatius, and Saba',
799
  'de' => 'Bonaire',
800
  'it' => 'Caraibi Olandesi',
801
  'es' => 'Bonaire',
880
  'de' => 'Bhutan',
881
  'it' => 'Bhutan',
882
  'es' => 'Bután',
883
+ 'fr' => 'Bhoutan',
884
  'ja' => 'ブータン王国',
885
  'pt-BR' => 'Butão',
886
  'ru' => 'Бутан',
1065
  'geoname_id' => 203312,
1066
  'names' =>
1067
  array (
1068
+ 'en' => 'DR Congo',
1069
+ 'de' => 'Kongo',
1070
  'it' => 'Repubblica Democratica del Congo',
1071
+ 'es' => 'Congo Democrático',
1072
  'fr' => 'RDC',
1073
  'ja' => 'コンゴ民主共和国',
1074
  'pt-BR' => 'Congo-Kinshasa',
1119
  'geoname_id' => 2260494,
1120
  'names' =>
1121
  array (
1122
+ 'en' => 'Congo Republic',
1123
  'de' => 'Kongo (Republik Kongo)',
1124
  'it' => 'Congo',
1125
  'es' => 'Congo [República]',
1390
  'names' =>
1391
  array (
1392
  'en' => 'Cabo Verde',
1393
+ 'de' => 'Kapverden',
1394
  'it' => 'Capo Verde',
1395
  'es' => 'Cabo Verde',
1396
  'fr' => 'Cap-Vert',
1416
  'geoname_id' => 7626836,
1417
  'names' =>
1418
  array (
1419
+ 'en' => 'Curaçao',
1420
  'de' => 'Curaçao',
1421
  'it' => 'Curacao',
1422
  'es' => 'Curazao',
1499
  array (
1500
  'en' => 'Czechia',
1501
  'de' => 'Tschechien',
1502
+ 'it' => 'Cechia',
1503
  'es' => 'República Checa',
1504
  'fr' => 'République tchèque',
1505
  'ja' => 'チェコ共和国',
1506
+ 'pt-BR' => 'Tchéquia',
1507
  'ru' => 'Чешская Республика',
1508
  'zh-CN' => '捷克共和国',
1509
  ),
1633
  'names' =>
1634
  array (
1635
  'en' => 'Dominican Republic',
1636
+ 'de' => 'Dom. Republik',
1637
  'it' => 'Repubblica Dominicana',
1638
  'es' => 'República Dominicana',
1639
  'fr' => 'République Dominicaine',
1985
  array (
1986
  'en' => 'Faroe Islands',
1987
  'de' => 'Färöer-Inseln',
1988
+ 'it' => 'Isole Faroe',
1989
  'es' => 'Islas Feroe',
1990
  'fr' => 'Îles Féroé',
1991
  'ja' => 'フェロー諸島',
2415
  'geoname_id' => 3474415,
2416
  'names' =>
2417
  array (
2418
+ 'en' => 'South Georgia and South Sandwich Islands',
2419
  'de' => 'Südgeorgien und die Südlichen Sandwichinseln',
2420
  'it' => 'Georgia del Sud e isole Sandwich meridionali',
2421
  'es' => 'Islas Georgia del Sur y Sandwich del Sur',
2422
+ 'fr' => 'Géorgie du Sud-et-les îles Sandwich du Sud',
2423
  'ja' => '南ジョージア島・南サンドイッチ諸島',
2424
  'pt-BR' => 'Geórgia do Sul e Ilhas Sandwich do Sul',
2425
  'ru' => 'Южная Джорджия и Южные Сандвичевы Острова',
2726
  'continent' => 'AS',
2727
  'location' =>
2728
  array (
2729
+ 'latitude' => -2.5179379499999306,
2730
+ 'longitude' => 118.01527325000004,
2731
  ),
2732
  ),
2733
  'IE' =>
2807
  'continent' => 'EU',
2808
  'location' =>
2809
  array (
2810
+ 'latitude' => 54.235753835920846,
2811
+ 'longitude' => -4.551163246336699,
2812
  ),
2813
  ),
2814
  'IN' =>
3225
  'geoname_id' => 3575174,
3226
  'names' =>
3227
  array (
3228
+ 'en' => 'St Kitts and Nevis',
3229
  'de' => 'Saint Kitts und Nevis',
3230
  'it' => 'Saint Kitts e Nevis',
3231
  'es' => 'San Cristóbal y Nieves',
3874
  'names' =>
3875
  array (
3876
  'en' => 'North Macedonia',
3877
+ 'de' => 'Nordmazedonien',
3878
+ 'it' => 'Macedonia del Nord',
3879
+ 'es' => 'Macedonia del Norte',
3880
+ 'fr' => 'Macédoine du Nord',
3881
  'ja' => 'マケドニア旧ユーゴスラビア共和国',
3882
  'pt-BR' => 'Macedônia',
3883
+ 'ru' => 'Северная Македония',
3884
  'zh-CN' => '前南斯拉夫马其顿共和国',
3885
  ),
3886
  ),
3927
  'geoname_id' => 1327865,
3928
  'names' =>
3929
  array (
3930
+ 'en' => 'Myanmar',
3931
  'de' => 'Birma (Myanmar)',
3932
  'it' => 'Birmania',
3933
  'es' => 'Myanmar [Birmania]',
4252
  'names' =>
4253
  array (
4254
  'en' => 'Malaysia',
4255
+ 'de' => 'Malaysia',
4256
  'it' => 'Malesia',
4257
  'es' => 'Malasia',
4258
  'fr' => 'Malaisie',
4366
  'fr' => 'Niger',
4367
  'ja' => 'ニジェール共和国',
4368
  'pt-BR' => 'Níger',
4369
+ 'ru' => 'Нигер',
4370
  'zh-CN' => '尼日尔',
4371
  ),
4372
  ),
4427
  'continent' => 'AF',
4428
  'location' =>
4429
  array (
4430
+ 'latitude' => 9.078115159500044,
4431
+ 'longitude' => 8.670771499500034,
4432
  ),
4433
  ),
4434
  'NI' =>
5416
  'de' => 'Svalbard und Jan Mayen',
5417
  'it' => 'Svalbard e Jan Mayen',
5418
  'es' => 'Svalbard y Jan Mayen',
5419
+ 'fr' => 'Svalbard et Jan Mayen',
5420
  'ja' => 'スバールバル諸島・ヤンマイエン島',
5421
  'pt-BR' => 'Svalbard e Jan Mayen',
5422
  'ru' => 'Свальбард и Ян-Майен',
5848
  'de' => 'Togo',
5849
  'it' => 'Togo',
5850
  'es' => 'Togo',
5851
+ 'fr' => 'Togo',
5852
  'ja' => 'トーゴ共和国',
5853
  'pt-BR' => 'Togo',
5854
  'ru' => 'Того',
6149
  'ja' => '中華民国',
6150
  'pt-BR' => 'Taiwan',
6151
  'ru' => 'Тайвань',
6152
+ 'zh-CN' => '中华民国',
6153
  ),
6154
  ),
6155
  'continent' => 'AS',
6283
  'fr' => 'États-Unis',
6284
  'ja' => 'アメリカ合衆国',
6285
  'pt-BR' => 'Estados Unidos',
6286
+ 'ru' => 'США',
6287
  'zh-CN' => '美国',
6288
  ),
6289
  ),
6384
  'geoname_id' => 3577815,
6385
  'names' =>
6386
  array (
6387
+ 'en' => 'St Vincent and Grenadines',
6388
  'de' => 'St. Vincent und die Grenadinen',
6389
  'it' => 'Saint Vincent e Grenadine',
6390
  'es' => 'San Vicente y las Granadinas',
6391
+ 'fr' => 'Saint-Vincent-et-les-Grenadines',
6392
  'ja' => 'セントビンセント・グレナディーン諸島',
6393
  'pt-BR' => 'São Vincente e Granadinas',
6394
  'ru' => 'Сент-Винсент и Гренадины',
6688
  'fr' => 'Afrique du Sud',
6689
  'ja' => '南アフリカ',
6690
  'pt-BR' => 'África do Sul',
6691
+ 'ru' => 'ЮАР',
6692
  'zh-CN' => '南非',
6693
  ),
6694
  ),
6756
  ),
6757
  'continents' =>
6758
  array (
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6759
  'EU' =>
6760
  array (
6761
  'code' => 'EU',
6772
  'zh-CN' => '欧洲',
6773
  ),
6774
  ),
6775
+ 'AS' =>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6776
  array (
6777
+ 'code' => 'AS',
6778
  'names' =>
6779
  array (
6780
+ 'en' => 'Asia',
6781
+ 'de' => 'Asien',
6782
+ 'it' => 'Asia',
6783
+ 'es' => 'Asia',
6784
+ 'fr' => 'Asie',
6785
+ 'ja' => 'アジア',
6786
+ 'pt-BR' => 'Ásia',
6787
+ 'ru' => 'Азия',
6788
+ 'zh-CN' => '亚洲',
6789
  ),
6790
  ),
6791
  'NA' =>
6804
  'zh-CN' => '北美洲',
6805
  ),
6806
  ),
6807
+ 'AF' =>
6808
+ array (
6809
+ 'code' => 'AF',
6810
+ 'names' =>
6811
+ array (
6812
+ 'en' => 'Africa',
6813
+ 'de' => 'Afrika',
6814
+ 'it' => 'Africa',
6815
+ 'es' => 'África',
6816
+ 'fr' => 'Afrique',
6817
+ 'ja' => 'アフリカ',
6818
+ 'pt-BR' => 'África',
6819
+ 'ru' => 'Африка',
6820
+ 'zh-CN' => '非洲',
6821
+ ),
6822
+ ),
6823
  'AN' =>
6824
  array (
6825
  'code' => 'AN',
6852
  'zh-CN' => '南美洲',
6853
  ),
6854
  ),
6855
+ 'OC' =>
6856
+ array (
6857
+ 'code' => 'OC',
6858
+ 'names' =>
6859
+ array (
6860
+ 'en' => 'Oceania',
6861
+ 'de' => 'Ozeanien',
6862
+ 'it' => 'Oceania',
6863
+ 'es' => 'Oceanía',
6864
+ 'fr' => 'Océanie',
6865
+ 'ja' => 'オセアニア',
6866
+ 'pt-BR' => 'Oceania',
6867
+ 'ru' => 'Океания',
6868
+ 'zh-CN' => '大洋洲',
6869
+ ),
6870
+ ),
6871
  ),
6872
  );
lib/geonames/data/country-names.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- // Generated at Wed, 18 Sep 2019 12:09:48 +0200
3
  return array (
4
  'en' =>
5
  array (
@@ -29,7 +29,7 @@ return array (
29
  'BM' => 'Bermuda',
30
  'BT' => 'Bhutan',
31
  'BO' => 'Bolivia',
32
- 'BQ' => 'Bonaire',
33
  'BA' => 'Bosnia and Herzegovina',
34
  'BW' => 'Botswana',
35
  'BV' => 'Bouvet Island',
@@ -53,14 +53,15 @@ return array (
53
  'CC' => 'Cocos [Keeling] Islands',
54
  'CO' => 'Colombia',
55
  'KM' => 'Comoros',
 
56
  'CK' => 'Cook Islands',
57
  'CR' => 'Costa Rica',
58
  'HR' => 'Croatia',
59
  'CU' => 'Cuba',
60
- 'CW' => 'Curacao',
61
  'CY' => 'Cyprus',
62
  'CZ' => 'Czechia',
63
- 'CD' => 'Democratic Republic of the Congo',
64
  'DK' => 'Denmark',
65
  'DJ' => 'Djibouti',
66
  'DM' => 'Dominica',
@@ -152,7 +153,7 @@ return array (
152
  'MS' => 'Montserrat',
153
  'MA' => 'Morocco',
154
  'MZ' => 'Mozambique',
155
- 'MM' => 'Myanmar [Burma]',
156
  'NA' => 'Namibia',
157
  'NR' => 'Nauru',
158
  'NP' => 'Nepal',
@@ -182,18 +183,15 @@ return array (
182
  'PT' => 'Portugal',
183
  'PR' => 'Puerto Rico',
184
  'QA' => 'Qatar',
185
- 'CG' => 'Republic of the Congo',
186
  'RO' => 'Romania',
187
  'RU' => 'Russia',
188
  'RW' => 'Rwanda',
189
  'RE' => 'Réunion',
190
  'BL' => 'Saint Barthélemy',
191
  'SH' => 'Saint Helena',
192
- 'KN' => 'Saint Kitts and Nevis',
193
  'LC' => 'Saint Lucia',
194
  'MF' => 'Saint Martin',
195
  'PM' => 'Saint Pierre and Miquelon',
196
- 'VC' => 'Saint Vincent and the Grenadines',
197
  'WS' => 'Samoa',
198
  'SM' => 'San Marino',
199
  'SA' => 'Saudi Arabia',
@@ -208,11 +206,13 @@ return array (
208
  'SB' => 'Solomon Islands',
209
  'SO' => 'Somalia',
210
  'ZA' => 'South Africa',
211
- 'GS' => 'South Georgia and the South Sandwich Islands',
212
  'KR' => 'South Korea',
213
  'SS' => 'South Sudan',
214
  'ES' => 'Spain',
215
  'LK' => 'Sri Lanka',
 
 
216
  'SD' => 'Sudan',
217
  'SR' => 'Suriname',
218
  'SJ' => 'Svalbard and Jan Mayen',
@@ -300,14 +300,12 @@ return array (
300
  'CK' => 'Cookinseln',
301
  'CR' => 'Costa Rica',
302
  'CW' => 'Curaçao',
303
- 'CD' => 'Demokratische Republik Kongo',
304
  'DE' => 'Deutschland',
 
305
  'DM' => 'Dominica',
306
- 'DO' => 'Dominikanische Republik',
307
  'DJ' => 'Dschibuti',
308
  'DK' => 'Dänemark',
309
  'EC' => 'Ecuador',
310
- 'MK' => 'Ehemalige jugoslawische Republik Mazedonien',
311
  'SV' => 'El Salvador',
312
  'CI' => 'Elfenbeinküste',
313
  'ER' => 'Eritrea',
@@ -357,7 +355,7 @@ return array (
357
  'KH' => 'Kambodscha',
358
  'CM' => 'Kamerun',
359
  'CA' => 'Kanada',
360
- 'CV' => 'Kap Verde',
361
  'KZ' => 'Kasachstan',
362
  'QA' => 'Katar',
363
  'KE' => 'Kenia',
@@ -366,6 +364,7 @@ return array (
366
  'CC' => 'Kokosinseln',
367
  'CO' => 'Kolumbien',
368
  'KM' => 'Komoren',
 
369
  'CG' => 'Kongo (Republik Kongo)',
370
  'XK' => 'Kosovo',
371
  'HR' => 'Kroatien',
@@ -383,7 +382,7 @@ return array (
383
  'MO' => 'Macau',
384
  'MG' => 'Madagaskar',
385
  'MW' => 'Malawi',
386
- 'MY' => 'Malaysien',
387
  'MV' => 'Malediven',
388
  'ML' => 'Mali',
389
  'MT' => 'Malta',
@@ -412,6 +411,7 @@ return array (
412
  'NI' => 'Nikaragua',
413
  'NU' => 'Niue',
414
  'KP' => 'Nordkorea',
 
415
  'NF' => 'Norfolkinsel',
416
  'NO' => 'Norwegen',
417
  'MP' => 'Nördliche Marianen',
@@ -548,6 +548,7 @@ return array (
548
  'CA' => 'Canada',
549
  'CV' => 'Capo Verde',
550
  'BQ' => 'Caraibi Olandesi',
 
551
  'TD' => 'Ciad',
552
  'CL' => 'Cile',
553
  'CN' => 'Cina',
@@ -616,7 +617,7 @@ return array (
616
  'CC' => 'Isole Cocos',
617
  'CK' => 'Isole Cook',
618
  'FK' => 'Isole Falkland',
619
- 'FO' => 'Isole Fær Øer',
620
  'HM' => 'Isole Heard e McDonald',
621
  'MP' => 'Isole Marianne Settentrionali',
622
  'MH' => 'Isole Marshall',
@@ -644,7 +645,7 @@ return array (
644
  'LT' => 'Lituania',
645
  'LU' => 'Lussemburgo',
646
  'MO' => 'Macao',
647
- 'MK' => 'Macedonia',
648
  'MG' => 'Madagascar',
649
  'MW' => 'Malawi',
650
  'MV' => 'Maldive',
@@ -690,7 +691,6 @@ return array (
690
  'PR' => 'Portorico',
691
  'QA' => 'Qatar',
692
  'GB' => 'Regno Unito',
693
- 'CZ' => 'Repubblica Ceca',
694
  'CF' => 'Repubblica Centrafricana',
695
  'CD' => 'Repubblica Democratica del Congo',
696
  'DO' => 'Repubblica Dominicana',
@@ -808,6 +808,7 @@ return array (
808
  'VA' => 'Ciudad del Vaticano',
809
  'CO' => 'Colombia',
810
  'KM' => 'Comoras',
 
811
  'CG' => 'Congo [República]',
812
  'KP' => 'Corea del Norte',
813
  'KR' => 'Corea del Sur',
@@ -904,7 +905,7 @@ return array (
904
  'LU' => 'Luxemburgo',
905
  'LB' => 'Líbano',
906
  'MO' => 'Macao',
907
- 'MK' => 'Macedonia',
908
  'MG' => 'Madagascar',
909
  'MY' => 'Malasia',
910
  'MW' => 'Malaui',
@@ -949,7 +950,6 @@ return array (
949
  'GB' => 'Reino Unido',
950
  'CF' => 'República Centroafricana',
951
  'CZ' => 'República Checa',
952
- 'CD' => 'República Democrática del Congo',
953
  'DO' => 'República Dominicana',
954
  'RE' => 'Reunión',
955
  'RW' => 'Ruanda',
@@ -960,8 +960,8 @@ return array (
960
  'BL' => 'San Bartolomé',
961
  'KN' => 'San Cristóbal y Nieves',
962
  'SM' => 'San Marino',
963
- 'MF' => 'San Martín',
964
  'SX' => 'San Martín',
 
965
  'PM' => 'San Pedro y Miquelón',
966
  'VC' => 'San Vicente y las Granadinas',
967
  'SH' => 'Santa Elena',
@@ -1039,7 +1039,7 @@ return array (
1039
  'BE' => 'Belgique',
1040
  'BZ' => 'Belize',
1041
  'BM' => 'Bermudes',
1042
- 'BT' => 'Bhutan',
1043
  'BY' => 'Biélorussie',
1044
  'BO' => 'Bolivie',
1045
  'BQ' => 'Bonaire, Saint-Eustache et Saba',
@@ -1094,7 +1094,7 @@ return array (
1094
  'GY' => 'Guyana',
1095
  'GF' => 'Guyane',
1096
  'GE' => 'Géorgie',
1097
- 'GS' => 'Géorgie du Sud et les îles Sandwich du Sud',
1098
  'HT' => 'Haïti',
1099
  'HN' => 'Honduras',
1100
  'HK' => 'Hong Kong',
@@ -1127,7 +1127,7 @@ return array (
1127
  'LT' => 'Lituanie',
1128
  'LU' => 'Luxembourg',
1129
  'MO' => 'Macao',
1130
- 'MK' => 'Macédoine',
1131
  'MG' => 'Madagascar',
1132
  'MY' => 'Malaisie',
1133
  'MW' => 'Malawi',
@@ -1181,17 +1181,16 @@ return array (
1181
  'RU' => 'Russie',
1182
  'RW' => 'Rwanda',
1183
  'DO' => 'République Dominicaine',
1184
- 'TG' => 'République Togolaise',
1185
  'CZ' => 'République tchèque',
1186
  'RE' => 'Réunion',
1187
  'EH' => 'Sahara Occidental',
1188
- 'BL' => 'Saint-Barthélémy',
1189
  'KN' => 'Saint-Christophe-et-Niévès',
1190
  'SM' => 'Saint-Marin',
1191
  'MF' => 'Saint-Martin',
1192
  'SX' => 'Saint-Martin',
1193
  'PM' => 'Saint-Pierre et Miquelon',
1194
- 'VC' => 'Saint-Vincent-et-les Grenadines',
1195
  'SH' => 'Sainte-Hélène',
1196
  'LC' => 'Sainte-Lucie',
1197
  'SV' => 'Salvador',
@@ -1210,7 +1209,7 @@ return array (
1210
  'CH' => 'Suisse',
1211
  'SR' => 'Surinam',
1212
  'SE' => 'Suède',
1213
- 'SJ' => 'Svalbard et Île Jan Mayen',
1214
  'SZ' => 'Swaziland',
1215
  'SY' => 'Syrie',
1216
  'ST' => 'São Tomé-et-Príncipe',
@@ -1224,6 +1223,7 @@ return array (
1224
  'PS' => 'Territoire palestinien',
1225
  'TH' => 'Thaïlande',
1226
  'TL' => 'Timor Oriental',
 
1227
  'TK' => 'Tokelau',
1228
  'TO' => 'Tonga',
1229
  'TT' => 'Trinidad et Tobago',
@@ -1641,7 +1641,6 @@ return array (
1641
  'MG' => 'Мадагаскар',
1642
  'YT' => 'Майотта',
1643
  'MO' => 'Макао',
1644
- 'MK' => 'Македония',
1645
  'MW' => 'Малави',
1646
  'MY' => 'Малайзия',
1647
  'ML' => 'Мали',
@@ -1662,7 +1661,7 @@ return array (
1662
  'NA' => 'Намибия',
1663
  'NR' => 'Науру',
1664
  'NP' => 'Непал',
1665
- 'NE' => 'Нигер1',
1666
  'NG' => 'Нигерия',
1667
  'NL' => 'Нидерланды',
1668
  'NI' => 'Никарагуа',
@@ -1670,7 +1669,7 @@ return array (
1670
  'NZ' => 'Новая Зеландия',
1671
  'NC' => 'Новая Каледония',
1672
  'NO' => 'Норвегия',
1673
- 'AE' => 'Оаэ',
1674
  'OM' => 'Оман',
1675
  'BV' => 'Остров Буве',
1676
  'DM' => 'Остров Доминика',
@@ -1698,6 +1697,7 @@ return array (
1698
  'RU' => 'Россия',
1699
  'RW' => 'Руанда',
1700
  'RO' => 'Румыния',
 
1701
  'SV' => 'Сальвадор',
1702
  'WS' => 'Самоа',
1703
  'SM' => 'Сан-Марино',
@@ -1706,6 +1706,7 @@ return array (
1706
  'SZ' => 'Свазиленд',
1707
  'SJ' => 'Свальбард и Ян-Майен',
1708
  'KP' => 'Северная Корея',
 
1709
  'MP' => 'Северные Марианские о-ва',
1710
  'SC' => 'Сейшельские о-ва',
1711
  'PM' => 'Сен-Пьер и Микелон',
@@ -1723,7 +1724,6 @@ return array (
1723
  'SO' => 'Сомали',
1724
  'SD' => 'Судан',
1725
  'SR' => 'Суринам',
1726
- 'US' => 'Сша',
1727
  'SL' => 'Сьерра-Леоне',
1728
  'TJ' => 'Таджикистан',
1729
  'TW' => 'Тайвань',
@@ -1765,7 +1765,7 @@ return array (
1765
  'ER' => 'Эритрея',
1766
  'EE' => 'Эстония',
1767
  'ET' => 'Эфиопия',
1768
- 'ZA' => 'Юар',
1769
  'GS' => 'Южная Джорджия и Южные Сандвичевы Острова',
1770
  'KR' => 'Южная Корея',
1771
  'SS' => 'Южный Судан',
1
  <?php
2
+ // Generated at Sat, 01 Aug 2020 11:56:09 +0200
3
  return array (
4
  'en' =>
5
  array (
29
  'BM' => 'Bermuda',
30
  'BT' => 'Bhutan',
31
  'BO' => 'Bolivia',
32
+ 'BQ' => 'Bonaire, Sint Eustatius, and Saba',
33
  'BA' => 'Bosnia and Herzegovina',
34
  'BW' => 'Botswana',
35
  'BV' => 'Bouvet Island',
53
  'CC' => 'Cocos [Keeling] Islands',
54
  'CO' => 'Colombia',
55
  'KM' => 'Comoros',
56
+ 'CG' => 'Congo Republic',
57
  'CK' => 'Cook Islands',
58
  'CR' => 'Costa Rica',
59
  'HR' => 'Croatia',
60
  'CU' => 'Cuba',
61
+ 'CW' => 'Curaçao',
62
  'CY' => 'Cyprus',
63
  'CZ' => 'Czechia',
64
+ 'CD' => 'DR Congo',
65
  'DK' => 'Denmark',
66
  'DJ' => 'Djibouti',
67
  'DM' => 'Dominica',
153
  'MS' => 'Montserrat',
154
  'MA' => 'Morocco',
155
  'MZ' => 'Mozambique',
156
+ 'MM' => 'Myanmar',
157
  'NA' => 'Namibia',
158
  'NR' => 'Nauru',
159
  'NP' => 'Nepal',
183
  'PT' => 'Portugal',
184
  'PR' => 'Puerto Rico',
185
  'QA' => 'Qatar',
 
186
  'RO' => 'Romania',
187
  'RU' => 'Russia',
188
  'RW' => 'Rwanda',
189
  'RE' => 'Réunion',
190
  'BL' => 'Saint Barthélemy',
191
  'SH' => 'Saint Helena',
 
192
  'LC' => 'Saint Lucia',
193
  'MF' => 'Saint Martin',
194
  'PM' => 'Saint Pierre and Miquelon',
 
195
  'WS' => 'Samoa',
196
  'SM' => 'San Marino',
197
  'SA' => 'Saudi Arabia',
206
  'SB' => 'Solomon Islands',
207
  'SO' => 'Somalia',
208
  'ZA' => 'South Africa',
209
+ 'GS' => 'South Georgia and South Sandwich Islands',
210
  'KR' => 'South Korea',
211
  'SS' => 'South Sudan',
212
  'ES' => 'Spain',
213
  'LK' => 'Sri Lanka',
214
+ 'KN' => 'St Kitts and Nevis',
215
+ 'VC' => 'St Vincent and Grenadines',
216
  'SD' => 'Sudan',
217
  'SR' => 'Suriname',
218
  'SJ' => 'Svalbard and Jan Mayen',
300
  'CK' => 'Cookinseln',
301
  'CR' => 'Costa Rica',
302
  'CW' => 'Curaçao',
 
303
  'DE' => 'Deutschland',
304
+ 'DO' => 'Dom. Republik',
305
  'DM' => 'Dominica',
 
306
  'DJ' => 'Dschibuti',
307
  'DK' => 'Dänemark',
308
  'EC' => 'Ecuador',
 
309
  'SV' => 'El Salvador',
310
  'CI' => 'Elfenbeinküste',
311
  'ER' => 'Eritrea',
355
  'KH' => 'Kambodscha',
356
  'CM' => 'Kamerun',
357
  'CA' => 'Kanada',
358
+ 'CV' => 'Kapverden',
359
  'KZ' => 'Kasachstan',
360
  'QA' => 'Katar',
361
  'KE' => 'Kenia',
364
  'CC' => 'Kokosinseln',
365
  'CO' => 'Kolumbien',
366
  'KM' => 'Komoren',
367
+ 'CD' => 'Kongo',
368
  'CG' => 'Kongo (Republik Kongo)',
369
  'XK' => 'Kosovo',
370
  'HR' => 'Kroatien',
382
  'MO' => 'Macau',
383
  'MG' => 'Madagaskar',
384
  'MW' => 'Malawi',
385
+ 'MY' => 'Malaysia',
386
  'MV' => 'Malediven',
387
  'ML' => 'Mali',
388
  'MT' => 'Malta',
411
  'NI' => 'Nikaragua',
412
  'NU' => 'Niue',
413
  'KP' => 'Nordkorea',
414
+ 'MK' => 'Nordmazedonien',
415
  'NF' => 'Norfolkinsel',
416
  'NO' => 'Norwegen',
417
  'MP' => 'Nördliche Marianen',
548
  'CA' => 'Canada',
549
  'CV' => 'Capo Verde',
550
  'BQ' => 'Caraibi Olandesi',
551
+ 'CZ' => 'Cechia',
552
  'TD' => 'Ciad',
553
  'CL' => 'Cile',
554
  'CN' => 'Cina',
617
  'CC' => 'Isole Cocos',
618
  'CK' => 'Isole Cook',
619
  'FK' => 'Isole Falkland',
620
+ 'FO' => 'Isole Faroe',
621
  'HM' => 'Isole Heard e McDonald',
622
  'MP' => 'Isole Marianne Settentrionali',
623
  'MH' => 'Isole Marshall',
645
  'LT' => 'Lituania',
646
  'LU' => 'Lussemburgo',
647
  'MO' => 'Macao',
648
+ 'MK' => 'Macedonia del Nord',
649
  'MG' => 'Madagascar',
650
  'MW' => 'Malawi',
651
  'MV' => 'Maldive',
691
  'PR' => 'Portorico',
692
  'QA' => 'Qatar',
693
  'GB' => 'Regno Unito',
 
694
  'CF' => 'Repubblica Centrafricana',
695
  'CD' => 'Repubblica Democratica del Congo',
696
  'DO' => 'Repubblica Dominicana',
808
  'VA' => 'Ciudad del Vaticano',
809
  'CO' => 'Colombia',
810
  'KM' => 'Comoras',
811
+ 'CD' => 'Congo Democrático',
812
  'CG' => 'Congo [República]',
813
  'KP' => 'Corea del Norte',
814
  'KR' => 'Corea del Sur',
905
  'LU' => 'Luxemburgo',
906
  'LB' => 'Líbano',
907
  'MO' => 'Macao',
908
+ 'MK' => 'Macedonia del Norte',
909
  'MG' => 'Madagascar',
910
  'MY' => 'Malasia',
911
  'MW' => 'Malaui',
950
  'GB' => 'Reino Unido',
951
  'CF' => 'República Centroafricana',
952
  'CZ' => 'República Checa',
 
953
  'DO' => 'República Dominicana',
954
  'RE' => 'Reunión',
955
  'RW' => 'Ruanda',
960
  'BL' => 'San Bartolomé',
961
  'KN' => 'San Cristóbal y Nieves',
962
  'SM' => 'San Marino',
 
963
  'SX' => 'San Martín',
964
+ 'MF' => 'San Martín',
965
  'PM' => 'San Pedro y Miquelón',
966
  'VC' => 'San Vicente y las Granadinas',
967
  'SH' => 'Santa Elena',
1039
  'BE' => 'Belgique',
1040
  'BZ' => 'Belize',
1041
  'BM' => 'Bermudes',
1042
+ 'BT' => 'Bhoutan',
1043
  'BY' => 'Biélorussie',
1044
  'BO' => 'Bolivie',
1045
  'BQ' => 'Bonaire, Saint-Eustache et Saba',
1094
  'GY' => 'Guyana',
1095
  'GF' => 'Guyane',
1096
  'GE' => 'Géorgie',
1097
+ 'GS' => 'Géorgie du Sud-et-les îles Sandwich du Sud',
1098
  'HT' => 'Haïti',
1099
  'HN' => 'Honduras',
1100
  'HK' => 'Hong Kong',
1127
  'LT' => 'Lituanie',
1128
  'LU' => 'Luxembourg',
1129
  'MO' => 'Macao',
1130
+ 'MK' => 'Macédoine du Nord',
1131
  'MG' => 'Madagascar',
1132
  'MY' => 'Malaisie',
1133
  'MW' => 'Malawi',
1181
  'RU' => 'Russie',
1182
  'RW' => 'Rwanda',
1183
  'DO' => 'République Dominicaine',
 
1184
  'CZ' => 'République tchèque',
1185
  'RE' => 'Réunion',
1186
  'EH' => 'Sahara Occidental',
1187
+ 'BL' => 'Saint-Barthélemy',
1188
  'KN' => 'Saint-Christophe-et-Niévès',
1189
  'SM' => 'Saint-Marin',
1190
  'MF' => 'Saint-Martin',
1191
  'SX' => 'Saint-Martin',
1192
  'PM' => 'Saint-Pierre et Miquelon',
1193
+ 'VC' => 'Saint-Vincent-et-les-Grenadines',
1194
  'SH' => 'Sainte-Hélène',
1195
  'LC' => 'Sainte-Lucie',
1196
  'SV' => 'Salvador',
1209
  'CH' => 'Suisse',
1210
  'SR' => 'Surinam',
1211
  'SE' => 'Suède',
1212
+ 'SJ' => 'Svalbard et Jan Mayen',
1213
  'SZ' => 'Swaziland',
1214
  'SY' => 'Syrie',
1215
  'ST' => 'São Tomé-et-Príncipe',
1223
  'PS' => 'Territoire palestinien',
1224
  'TH' => 'Thaïlande',
1225
  'TL' => 'Timor Oriental',
1226
+ 'TG' => 'Togo',
1227
  'TK' => 'Tokelau',
1228
  'TO' => 'Tonga',
1229
  'TT' => 'Trinidad et Tobago',
1641
  'MG' => 'Мадагаскар',
1642
  'YT' => 'Майотта',
1643
  'MO' => 'Макао',
 
1644
  'MW' => 'Малави',
1645
  'MY' => 'Малайзия',
1646
  'ML' => 'Мали',
1661
  'NA' => 'Намибия',
1662
  'NR' => 'Науру',
1663
  'NP' => 'Непал',
1664
+ 'NE' => 'Нигер',
1665
  'NG' => 'Нигерия',
1666
  'NL' => 'Нидерланды',
1667
  'NI' => 'Никарагуа',
1669
  'NZ' => 'Новая Зеландия',
1670
  'NC' => 'Новая Каледония',
1671
  'NO' => 'Норвегия',
1672
+ 'AE' => 'ОАЭ',
1673
  'OM' => 'Оман',
1674
  'BV' => 'Остров Буве',
1675
  'DM' => 'Остров Доминика',
1697
  'RU' => 'Россия',
1698
  'RW' => 'Руанда',
1699
  'RO' => 'Румыния',
1700
+ 'US' => 'США',
1701
  'SV' => 'Сальвадор',
1702
  'WS' => 'Самоа',
1703
  'SM' => 'Сан-Марино',
1706
  'SZ' => 'Свазиленд',
1707
  'SJ' => 'Свальбард и Ян-Майен',
1708
  'KP' => 'Северная Корея',
1709
+ 'MK' => 'Северная Македония',
1710
  'MP' => 'Северные Марианские о-ва',
1711
  'SC' => 'Сейшельские о-ва',
1712
  'PM' => 'Сен-Пьер и Микелон',
1724
  'SO' => 'Сомали',
1725
  'SD' => 'Судан',
1726
  'SR' => 'Суринам',
 
1727
  'SL' => 'Сьерра-Леоне',
1728
  'TJ' => 'Таджикистан',
1729
  'TW' => 'Тайвань',
1765
  'ER' => 'Эритрея',
1766
  'EE' => 'Эстония',
1767
  'ET' => 'Эфиопия',
1768
+ 'ZA' => 'ЮАР',
1769
  'GS' => 'Южная Джорджия и Южные Сандвичевы Острова',
1770
  'KR' => 'Южная Корея',
1771
  'SS' => 'Южный Судан',
lib/logger.php CHANGED
@@ -9,14 +9,40 @@ class Logger {
9
  const CATEGORY_CRON = 'cron';
10
  const CATEGORY_UPDATE = 'update';
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  // Other errors to log: lookup, API
13
 
14
  public static function logIfError($str, $category = '', $data = array()) {
15
  if (is_wp_error($str)) {
 
 
 
 
 
16
  $str = $str->get_error_message();
17
  }
18
 
19
  if (is_string($str)) {
 
 
 
20
  self::log($str, $category, $data);
21
  }
22
  }
@@ -40,4 +66,4 @@ class Logger {
40
 
41
 
42
  }
43
-
9
  const CATEGORY_CRON = 'cron';
10
  const CATEGORY_UPDATE = 'update';
11
 
12
+ protected static $ignoreErrorCodes = [
13
+ 'http_304',
14
+ ];
15
+ protected static $ignoreErrorMessages = [
16
+ 'It has not changed since the last update.'
17
+ ];
18
+
19
+ public static function init() {
20
+ $translated = [];
21
+ foreach (self::$ignoreErrorMessages as $msg) {
22
+ $tr = __($msg, 'geoip-detect');
23
+ if ($tr !== $msg) {
24
+ $translated[] = $tr;
25
+ }
26
+ }
27
+ self::$ignoreErrorMessages = array_merge(self::$ignoreErrorMessages, $translated);
28
+ }
29
+
30
  // Other errors to log: lookup, API
31
 
32
  public static function logIfError($str, $category = '', $data = array()) {
33
  if (is_wp_error($str)) {
34
+ $code = $str->get_error_code();
35
+ if ($code && in_array($code, self::$ignoreErrorCodes)) {
36
+ return;
37
+ }
38
+
39
  $str = $str->get_error_message();
40
  }
41
 
42
  if (is_string($str)) {
43
+ if (in_array($str, self::$ignoreErrorMessages)) {
44
+ return;
45
+ }
46
  self::log($str, $category, $data);
47
  }
48
  }
66
 
67
 
68
  }
69
+ Logger::init();
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: benjaminpick
3
  Tags: geolocation, locator, geoip, maxmind, ipstack
4
  Requires at least: 4.0
5
- Tested up to: 5.4
6
  Requires PHP: 5.6
7
  Stable tag: trunk
8
  License: GPLv3 or later
@@ -153,6 +153,12 @@ New: Shortcode for showing/hiding content!
153
 
154
  == Changelog ==
155
 
 
 
 
 
 
 
156
  = 3.1.0 =
157
  * FIX: The property access for shortcodes has been rewritten so that property names such as "extra.original.zip" (Datasource: ipstack) are possible now.
158
  * FIX: The lookup page now also shows subdivisions (e.g. for IPs from Uk that have 2 levels of subdivisions)
2
  Contributors: benjaminpick
3
  Tags: geolocation, locator, geoip, maxmind, ipstack
4
  Requires at least: 4.0
5
+ Tested up to: 5.5
6
  Requires PHP: 5.6
7
  Stable tag: trunk
8
  License: GPLv3 or later
153
 
154
  == Changelog ==
155
 
156
+ = 3.1.1 =
157
+ * NEW: Add the possibility to access the ISO-3166 alpha3 version of `$record->country`: `$record->extra->isoCode3` or `[geoip_detect2 property="extra.countryIsoCode3"]`
158
+ * FIX: The (CF7) shortcode `[geoip_detect2_countries]` now selects the selected country on page reload (the HTML tag autocomplete is set to `off` now)
159
+ * FIX: Subnets can now be entered in the preferences of the reverse proxy again (this was a regression of the Admin UI changes in 3.0.3)
160
+ * FIX: Do not log "It has not changed since the last update." as a cron-related error that should be shown to the user.
161
+
162
  = 3.1.0 =
163
  * FIX: The property access for shortcodes has been rewritten so that property names such as "extra.original.zip" (Datasource: ipstack) are possible now.
164
  * FIX: The lookup page now also shows subdivisions (e.g. for IPs from Uk that have 2 levels of subdivisions)
shortcode.php CHANGED
@@ -264,6 +264,7 @@ function geoip_detect2_shortcode_country_select($attr) {
264
  'class' => !empty($attr['class']) ? $attr['class'] : 'geoip_detect2_countries',
265
  'aria-required' => !empty($attr['required']) ? 'required' : '',
266
  'aria-invalid' => !empty($attr['invalid']) ? $attr['invalid'] : '',
 
267
  );
268
 
269
  $countryInfo = new YellowTree\GeoipDetect\Geonames\CountryInformation();
264
  'class' => !empty($attr['class']) ? $attr['class'] : 'geoip_detect2_countries',
265
  'aria-required' => !empty($attr['required']) ? 'required' : '',
266
  'aria-invalid' => !empty($attr['invalid']) ? $attr['invalid'] : '',
267
+ 'autocomplete' => 'off',
268
  );
269
 
270
  $countryInfo = new YellowTree\GeoipDetect\Geonames\CountryInformation();
yarn.lock CHANGED
@@ -1266,9 +1266,9 @@ bindings@^1.5.0:
1266
  file-uri-to-path "1.0.0"
1267
 
1268
  bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0:
1269
- version "4.11.8"
1270
- resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f"
1271
- integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==
1272
 
1273
  bn.js@^5.1.1:
1274
  version "5.1.1"
@@ -2224,9 +2224,9 @@ electron-to-chromium@^1.3.413:
2224
  integrity sha512-ty0LEroTap/xfMy31oQ3XX+Q377QvWvJaha2cmuXcbmBiX2EIB5SNDQ0hp8lhvxj63WG0zOgm/4MQ/oUBdfQqg==
2225
 
2226
  elliptic@^6.0.0, elliptic@^6.5.2:
2227
- version "6.5.2"
2228
- resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762"
2229
- integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==
2230
  dependencies:
2231
  bn.js "^4.4.0"
2232
  brorand "^1.0.1"
1266
  file-uri-to-path "1.0.0"
1267
 
1268
  bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0:
1269
+ version "4.11.9"
1270
+ resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828"
1271
+ integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==
1272
 
1273
  bn.js@^5.1.1:
1274
  version "5.1.1"
2224
  integrity sha512-ty0LEroTap/xfMy31oQ3XX+Q377QvWvJaha2cmuXcbmBiX2EIB5SNDQ0hp8lhvxj63WG0zOgm/4MQ/oUBdfQqg==
2225
 
2226
  elliptic@^6.0.0, elliptic@^6.5.2:
2227
+ version "6.5.3"
2228
+ resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6"
2229
+ integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==
2230
  dependencies:
2231
  bn.js "^4.4.0"
2232
  brorand "^1.0.1"