Translate WordPress with GTranslate - Version 2.8.44

Version Description

  • Added cacert file to verify peer when calling home
  • Passing real visitor IP address when loading translations
  • Logos updated
Download this release

Release Info

Developer edo888
Plugin Icon 128x128 Translate WordPress with GTranslate
Version 2.8.44
Comparing to
See all releases

Code changes from version 2.8.43 to 2.8.44

gt-logo.png DELETED
Binary file
gt_logo.svg ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="65 82 266 60" xml:space="preserve">
2
+ <style type="text/css">
3
+ .st18{fill:#252972;}
4
+ .st35{fill:none;stroke:#FFAE1F;stroke-width:2.3229;stroke-miterlimit:10;}
5
+ </style>
6
+ <g>
7
+ <g>
8
+ <path class="st18" d="M70.1,111.4L70.1,111.4c0-9.8,7.6-17.8,17.9-17.8c6.1,0,9.9,1.7,13.4,4.7l-4.7,5.7c-2.6-2.2-5-3.5-8.9-3.5
9
+ c-5.5,0-9.8,4.8-9.8,10.6v0.1c0,6.2,4.3,10.8,10.3,10.8c2.7,0,5.2-0.7,7.1-2v-4.9h-7.6v-6.5h14.8v14.8c-3.5,3-8.3,5.4-14.6,5.4
10
+ C77.5,128.9,70.1,121.5,70.1,111.4z"/>
11
+ <path class="st18" d="M131.2,122v-16.3h-3.6v-2.2h3.6v-8h2.4v8h8.7v2.2h-8.7v16c0,3.6,2.1,4.8,5,4.8c1.2,0,2.2-0.2,3.7-0.9v2.2
12
+ c-1.3,0.6-2.5,0.9-4,0.9C134.3,128.8,131.2,126.7,131.2,122z"/>
13
+ <path class="st18" d="M149.4,103.5h2.4v7.1c2-4.4,6.1-7.7,11-7.5v2.6h-0.2c-5.8,0-10.8,4.3-10.8,12.4v10.2h-2.4V103.5z"/>
14
+ <path class="st18" d="M165.6,121.1L165.6,121.1c0-5.3,4.4-8.2,10.9-8.2c3.5,0,5.9,0.4,8.2,1.1v-1.1c0-5-3.1-7.6-8.2-7.6
15
+ c-3,0-5.5,0.8-7.8,2l-0.9-2.1c2.7-1.3,5.4-2.1,8.8-2.1c3.4,0,6,0.9,7.9,2.7c1.7,1.7,2.5,4,2.5,7v15.5h-2.3v-4.1
16
+ c-1.7,2.4-4.8,4.7-9.5,4.7C170.6,128.9,165.6,126.3,165.6,121.1z M184.8,119v-2.8c-2.1-0.5-4.9-1.1-8.4-1.1
17
+ c-5.3,0-8.2,2.3-8.2,5.8v0.1c0,3.6,3.4,5.7,7.2,5.7C180.4,126.7,184.8,123.6,184.8,119z"/>
18
+ <path class="st18" d="M195.7,103.5h2.4v4.6c1.7-2.9,4.4-5.2,9-5.2c6.3,0,10,4.3,10,10.2v15.2h-2.4v-14.8c0-5.1-2.9-8.5-7.9-8.5
19
+ c-4.9,0-8.6,3.7-8.6,8.9v14.4h-2.4V103.5z"/>
20
+ <path class="st18" d="M223.4,125.2l1.4-1.9c2.7,2.1,5.8,3.3,8.9,3.3c3.4,0,6-1.9,6-4.7v-0.1c0-2.9-3.1-4-6.6-5
21
+ c-4-1.2-8.5-2.4-8.5-6.8v-0.1c0-4,3.4-6.9,8.2-6.9c3,0,6.3,1.1,8.8,2.7l-1.3,2c-2.3-1.5-5-2.5-7.7-2.5c-3.4,0-5.7,1.9-5.7,4.3
22
+ v0.1c0,2.8,3.4,3.8,6.9,4.8c4,1.1,8.2,2.6,8.2,7v0.1c0,4.4-3.8,7.3-8.6,7.3C230,128.8,226,127.4,223.4,125.2z"/>
23
+ <path class="st18" d="M250.1,92.7h2.4v35.6h-2.4V92.7z"/>
24
+ <path class="st18" d="M259.9,121.1L259.9,121.1c0-5.3,4.4-8.2,10.9-8.2c3.5,0,5.9,0.4,8.2,1.1v-1.1c0-5-3.1-7.6-8.2-7.6
25
+ c-3,0-5.5,0.8-7.8,2l-0.9-2.1c2.7-1.3,5.4-2.1,8.8-2.1c3.4,0,6,0.9,7.9,2.7c1.7,1.7,2.5,4,2.5,7v15.5H279v-4.1
26
+ c-1.7,2.4-4.8,4.7-9.5,4.7C264.9,128.9,259.9,126.3,259.9,121.1z M279.1,119v-2.8c-2.1-0.5-4.9-1.1-8.4-1.1
27
+ c-5.3,0-8.2,2.3-8.2,5.8v0.1c0,3.6,3.4,5.7,7.2,5.7C274.7,126.7,279.1,123.6,279.1,119z"/>
28
+ <path class="st18" d="M291,122v-16.3h-3.6v-2.2h3.6v-8h2.4v8h8.7v2.2h-8.7v16c0,3.6,2.1,4.8,5,4.8c1.2,0,2.2-0.2,3.7-0.9v2.2
29
+ c-1.3,0.6-2.5,0.9-4,0.9C294.1,128.8,291,126.7,291,122z"/>
30
+ <path class="st18" d="M306.8,116L306.8,116c0-7.3,5.1-13.1,11.8-13.1c7,0,11.4,5.7,11.4,13c0,0.4,0,0.6,0,1h-20.6
31
+ c0.4,6.2,4.9,9.8,9.8,9.8c3.9,0,6.5-1.7,8.5-3.9l1.7,1.5c-2.5,2.7-5.5,4.7-10.3,4.7C312.4,128.9,306.8,123.7,306.8,116z
32
+ M327.4,114.7c-0.3-5-3.2-9.7-8.9-9.7c-4.9,0-8.7,4.1-9.2,9.7H327.4z"/>
33
+ </g>
34
+ <line class="st35" x1="117" y1="139.7" x2="117" y2="85.3"/>
35
+ </g>
36
+ </svg>
gtranslate-notices.css CHANGED
@@ -1,55 +1,55 @@
1
- .gt-admin-notice {
2
- background: #fff;
3
- border-color: #ED494D;
4
- border-top: 4px;
5
- display: block;
6
- min-height: 68px;
7
- padding: 10px 40px 10px 145px;
8
- position: relative;
9
- }
10
- .gt-admin-notice a {
11
- color: #ED494D;
12
- }
13
- .gt-notice-logo {
14
- clear: both;
15
- content: "";
16
- display: block;
17
- background-image: url(gt-logo.png);
18
- background-size: 125px auto;
19
- background-repeat: no-repeat;
20
- background-position: 0 45%;
21
- width: 125px;
22
- position: absolute;
23
- top: 0;
24
- bottom: 0;
25
- left: 5px;
26
- }
27
- .gt-admin-notice > .dashicons {
28
- color: #424242;
29
- position: absolute;
30
- right: 20px;
31
- top: 40%;
32
- }
33
- .gt-notice-title {
34
- font-size: 24px;
35
- margin: 0;
36
- }
37
- .gt-notice-body {
38
- font-weight: normal;
39
- margin: 5px 0;
40
- }
41
- .gt-notice-body:after {
42
- clear: both;
43
- content: "";
44
- display: block;
45
- }
46
- .gt-notice-body li {
47
- float: left;
48
- margin-right: 20px;
49
- }
50
- .gt-notice-body .dashicons {
51
- font-size: 17px;
52
- }
53
- .gt-red {
54
- color: #ED494D;
55
  }
1
+ .gt-admin-notice {
2
+ background: #fff;
3
+ border-color: #ED494D;
4
+ border-top: 4px;
5
+ display: block;
6
+ min-height: 68px;
7
+ padding: 10px 40px 10px 145px;
8
+ position: relative;
9
+ }
10
+ .gt-admin-notice a {
11
+ color: #ED494D;
12
+ }
13
+ .gt-notice-logo {
14
+ clear: both;
15
+ content: "";
16
+ display: block;
17
+ background-image: url(gt_logo.svg);
18
+ background-size: 125px auto;
19
+ background-repeat: no-repeat;
20
+ background-position: 0 45%;
21
+ width: 125px;
22
+ position: absolute;
23
+ top: 0;
24
+ bottom: 0;
25
+ left: 5px;
26
+ }
27
+ .gt-admin-notice > .dashicons {
28
+ color: #424242;
29
+ position: absolute;
30
+ right: 20px;
31
+ top: 40%;
32
+ }
33
+ .gt-notice-title {
34
+ font-size: 24px;
35
+ margin: 0;
36
+ }
37
+ .gt-notice-body {
38
+ font-weight: normal;
39
+ margin: 5px 0;
40
+ }
41
+ .gt-notice-body:after {
42
+ clear: both;
43
+ content: "";
44
+ display: block;
45
+ }
46
+ .gt-notice-body li {
47
+ float: left;
48
+ margin-right: 20px;
49
+ }
50
+ .gt-notice-body .dashicons {
51
+ font-size: 17px;
52
+ }
53
+ .gt-red {
54
+ color: #ED494D;
55
  }
gtranslate.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: GTranslate
4
  Plugin URI: https://gtranslate.io/?xyz=998
5
  Description: Makes your website <strong>multilingual</strong> and available to the world using Google Translate. For support visit <a href="https://wordpress.org/support/plugin/gtranslate">GTranslate Support</a>.
6
- Version: 2.8.43
7
  Author: Translate AI Multilingual Solutions
8
  Author URI: https://gtranslate.io
9
  Text Domain: gtranslate
@@ -236,7 +236,7 @@ class GTranslate extends WP_Widget {
236
  ?>
237
  <div class="wrap">
238
  <div id="icon-options-general" class="icon32"><br/></div>
239
- <h2><img src="<?php echo plugins_url('gt-logo.png', __FILE__); ?>" border="0" title="<?php _e('GTranslate - your window to the world', 'gtranslate'); ?>" alt="GTranslate"></h2>
240
  <?php
241
  if(isset($_POST['save']) and $_POST['save'])
242
  GTranslate::control_options();
3
  Plugin Name: GTranslate
4
  Plugin URI: https://gtranslate.io/?xyz=998
5
  Description: Makes your website <strong>multilingual</strong> and available to the world using Google Translate. For support visit <a href="https://wordpress.org/support/plugin/gtranslate">GTranslate Support</a>.
6
+ Version: 2.8.44
7
  Author: Translate AI Multilingual Solutions
8
  Author URI: https://gtranslate.io
9
  Text Domain: gtranslate
236
  ?>
237
  <div class="wrap">
238
  <div id="icon-options-general" class="icon32"><br/></div>
239
+ <h2><img src="<?php echo plugins_url('gt_logo.svg', __FILE__); ?>" border="0" title="<?php _e('GTranslate - your window to the world', 'gtranslate'); ?>" alt="G|translate" height="70"></h2>
240
  <?php
241
  if(isset($_POST['save']) and $_POST['save'])
242
  GTranslate::control_options();
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: edo888
3
  Author: Translate AI Multilingual Solutions
4
  Tags: translate wordpress, multilingual, translate, translation, language, bilingual, localization, translation proxy, i18n, l10n, localisation, multilanguage, google translate
5
  Requires at least: 2.8.1
6
- Tested up to: 4.9
7
- Stable tag: 2.8.43
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Donate link: https://gtranslate.io/?xyz=998#pricing
@@ -221,6 +221,11 @@ You need to go to the language you want to edit, for instance, French: http://do
221
  8. User Dashboard
222
 
223
  == Changelog ==
 
 
 
 
 
224
  = 2.8.43 =
225
  * New features in User Dashboard:
226
  * Find and Replace before and after translation
3
  Author: Translate AI Multilingual Solutions
4
  Tags: translate wordpress, multilingual, translate, translation, language, bilingual, localization, translation proxy, i18n, l10n, localisation, multilanguage, google translate
5
  Requires at least: 2.8.1
6
+ Tested up to: 5.1
7
+ Stable tag: 2.8.44
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Donate link: https://gtranslate.io/?xyz=998#pricing
221
  8. User Dashboard
222
 
223
  == Changelog ==
224
+ = 2.8.44 =
225
+ * Added cacert file to verify peer when calling home
226
+ * Passing real visitor IP address when loading translations
227
+ * Logos updated
228
+
229
  = 2.8.43 =
230
  * New features in User Dashboard:
231
  * Find and Replace before and after translation
url_addon/cacert.pem ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIDmzCCAoOgAwIBAgIJAPOBZ4SX34/0MA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNV
3
+ BAYTAlVTMQswCQYDVQQIDAJDQTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzEXMBUG
4
+ A1UECgwOR1RyYW5zbGF0ZSBJbmMxFzAVBgNVBAMMDmd0cmFuc2xhdGUuY29tMB4X
5
+ DTE5MDExMDE5NDM1N1oXDTE5MDIwOTE5NDM1N1owZDELMAkGA1UEBhMCVVMxCzAJ
6
+ BgNVBAgMAkNBMRYwFAYDVQQHDA1TYW4gRnJhbmNpc2NvMRcwFQYDVQQKDA5HVHJh
7
+ bnNsYXRlIEluYzEXMBUGA1UEAwwOZ3RyYW5zbGF0ZS5jb20wggEiMA0GCSqGSIb3
8
+ DQEBAQUAA4IBDwAwggEKAoIBAQDlaUVkjj6AGBLNx3KZ2kWmYiBJ0kMubAroBU8A
9
+ f+KBD9yX95Yc0P4AfHoI4SUcS2h8CTVtq/EGhMoj+L4Zt8y71AbbaQBPbmPGQd/e
10
+ jCLK5SXxT2iG159zwHD/aCY2MJB1P9dCSzINa+mp12Dh1dceP0/8MBGyCiZ7Z6Y2
11
+ c2ccW+0CepChsniOZjeerLHc7j/Rmw5oN2kAJjuMaCEA7XFqpawvUMbA1p6kyEEm
12
+ 9ICwZzUkXjgB/2Yp7jGpK2H0kb4kct7K6XNoJMy1vhUFsiVJMuVHLkw+v0dqBjGX
13
+ bRWcbX5FQX36SjQAJaw/N0wD7S4QXJoPN/0Wit9AMscg2njdAgMBAAGjUDBOMB0G
14
+ A1UdDgQWBBTi2mFocI+S6TQEiYOtg0QM+Vit3TAfBgNVHSMEGDAWgBTi2mFocI+S
15
+ 6TQEiYOtg0QM+Vit3TAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAn
16
+ YH7kvWFmJ2OEm4x8SXGZ5k6+CAa8YTpHqBcP5ThDxZf4hnajNGLsGfRVfXiFmbTM
17
+ pIzz/fOcisqJltr3xTtkhFZUgEifeKhk+k3N0RPlupGHK/iW5mBn36UCKf1VBZyg
18
+ U2/pHG+vMlVh0GGT90iwz1HtXkeZ7viu65offfzsS8z7jWLBOOpPTKPN5o/TABKr
19
+ OWA7h/wbilQDmv+JurInvHwXn30Hn1z3GR2UlJo2w1b/VbtyIe4ye74YJC1Eq4DT
20
+ siNd2UJs9rs7tbWBnDvUiIjFWVazZ8yJK2LsvavtGK+VzTJstxY0ML6eAgbR0aXz
21
+ vkcZG391yfOIbl3v12a4
22
+ -----END CERTIFICATE-----
url_addon/gtranslate.php CHANGED
@@ -113,6 +113,22 @@ foreach($request_headers as $key => $val) {
113
  $headers[] = $key . ': ' . $val;
114
  }
115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  //print_r($headers);
117
  //exit;
118
 
@@ -123,8 +139,9 @@ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
123
  curl_setopt($ch, CURLOPT_HEADER, true);
124
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
125
  //curl_setopt($ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
126
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
127
  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
 
128
 
129
  switch($_SERVER['REQUEST_METHOD']) {
130
  case 'POST': {
113
  $headers[] = $key . ': ' . $val;
114
  }
115
 
116
+ // add real visitor IP header
117
+ if(isset($_SERVER['HTTP_CLIENT_IP']) and !empty($_SERVER['HTTP_CLIENT_IP']))
118
+ $viewer_ip_address = $_SERVER['HTTP_CLIENT_IP'];
119
+ if(isset($_SERVER['HTTP_CF_CONNECTING_IP']) and !empty($_SERVER['HTTP_CF_CONNECTING_IP']))
120
+ $viewer_ip_address = $_SERVER['HTTP_CF_CONNECTING_IP'];
121
+ if(isset($_SERVER['HTTP_X_SUCURI_CLIENTIP']) and !empty($_SERVER['HTTP_X_SUCURI_CLIENTIP']))
122
+ $viewer_ip_address = $_SERVER['HTTP_X_SUCURI_CLIENTIP'];
123
+ if(!isset($viewer_ip_addres))
124
+ $viewer_ip_address = $_SERVER['REMOTE_ADDR'];
125
+
126
+ $headers[] = 'X-GT-Viewer-IP: ' . $viewer_ip_address;
127
+
128
+ // add X-Forwarded-For
129
+ if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and !empty($_SERVER['HTTP_X_FORWARDED_FOR']))
130
+ $headers[] = 'X-GT-Forwarded-For: ' . $_SERVER['HTTP_X_FORWARDED_FOR'];
131
+
132
  //print_r($headers);
133
  //exit;
134
 
139
  curl_setopt($ch, CURLOPT_HEADER, true);
140
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
141
  //curl_setopt($ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
142
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
143
  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
144
+ curl_setopt($ch, CURLOPT_CAINFO, 'cacert.pem');
145
 
146
  switch($_SERVER['REQUEST_METHOD']) {
147
  case 'POST': {