Lingotek Translation - Version 1.2.6

Version Description

(2017-3-3) =

  • Increased API timeout
Download this release

Release Info

Developer erichie
Plugin Icon 128x128 Lingotek Translation
Version 1.2.6
Comparing to
See all releases

Code changes from version 1.2.5 to 1.2.6

Files changed (3) hide show
  1. include/http.php +5 -4
  2. lingotek.php +2 -2
  3. readme.txt +5 -1
include/http.php CHANGED
@@ -8,6 +8,7 @@
8
  class Lingotek_HTTP {
9
  protected $headers = array();
10
 
 
11
  /*
12
  * formats a request as multipart
13
  * greatly inspired from mailgun wordpress plugin
@@ -50,7 +51,7 @@ class Lingotek_HTTP {
50
  if (!empty($args)) {
51
  Lingotek::log($args);
52
  }
53
- return wp_remote_post($url, array('headers' => $this->headers, 'body' => $args));
54
  }
55
 
56
  /*
@@ -63,7 +64,7 @@ class Lingotek_HTTP {
63
  if (!empty($args)) {
64
  Lingotek::log($args);
65
  }
66
- return wp_remote_get($url, array('headers' => $this->headers, 'body' => $args, 'timeout' => 30));
67
  }
68
 
69
  /*
@@ -76,7 +77,7 @@ class Lingotek_HTTP {
76
  if (!empty($args)) {
77
  Lingotek::log($args);
78
  }
79
- return wp_remote_request($url, array('method' => 'DELETE', 'headers' => $this->headers, 'body' => $args));
80
  }
81
 
82
  /*
@@ -89,6 +90,6 @@ class Lingotek_HTTP {
89
  if (!empty($args)) {
90
  Lingotek::log($args);
91
  }
92
- return wp_remote_request($url, array('method' => 'PATCH', 'headers' => $this->headers, 'body' => $args));
93
  }
94
  }
8
  class Lingotek_HTTP {
9
  protected $headers = array();
10
 
11
+ const TIMEOUT = 30;
12
  /*
13
  * formats a request as multipart
14
  * greatly inspired from mailgun wordpress plugin
51
  if (!empty($args)) {
52
  Lingotek::log($args);
53
  }
54
+ return wp_remote_post($url, array('headers' => $this->headers, 'body' => $args, 'timeout' => self::TIMEOUT));
55
  }
56
 
57
  /*
64
  if (!empty($args)) {
65
  Lingotek::log($args);
66
  }
67
+ return wp_remote_get($url, array('headers' => $this->headers, 'body' => $args, 'timeout' => self::TIMEOUT));
68
  }
69
 
70
  /*
77
  if (!empty($args)) {
78
  Lingotek::log($args);
79
  }
80
+ return wp_remote_request($url, array('method' => 'DELETE', 'headers' => $this->headers, 'body' => $args, 'timeout' => self::TIMEOUT));
81
  }
82
 
83
  /*
90
  if (!empty($args)) {
91
  Lingotek::log($args);
92
  }
93
+ return wp_remote_request($url, array('method' => 'PATCH', 'headers' => $this->headers, 'body' => $args, 'timeout' => self::TIMEOUT));
94
  }
95
  }
lingotek.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin name: Lingotek Translation
4
  Plugin URI: http://lingotek.com/wordpress#utm_source=wpadmin&utm_medium=plugin&utm_campaign=wplingotektranslationplugin
5
- Version: 1.2.5
6
  Author: Lingotek and Frédéric Demarle
7
  Author uri: http://lingotek.com
8
  Description: Lingotek offers convenient cloud-based localization and translation.
@@ -15,7 +15,7 @@ GitHub Plugin URI: https://github.com/lingotek/lingotek-translation
15
  if (!function_exists('add_action'))
16
  exit();
17
 
18
- define('LINGOTEK_VERSION', '1.2.5'); // plugin version (should match above meta)
19
  define('LINGOTEK_MIN_PLL_VERSION', '1.8');
20
  define('LINGOTEK_BASENAME', plugin_basename(__FILE__)); // plugin name as known by WP
21
  define('LINGOTEK_PLUGIN_SLUG', 'lingotek-translation');// plugin slug (should match above meta: Text Domain)
2
  /*
3
  Plugin name: Lingotek Translation
4
  Plugin URI: http://lingotek.com/wordpress#utm_source=wpadmin&utm_medium=plugin&utm_campaign=wplingotektranslationplugin
5
+ Version: 1.2.6
6
  Author: Lingotek and Frédéric Demarle
7
  Author uri: http://lingotek.com
8
  Description: Lingotek offers convenient cloud-based localization and translation.
15
  if (!function_exists('add_action'))
16
  exit();
17
 
18
+ define('LINGOTEK_VERSION', '1.2.6'); // plugin version (should match above meta)
19
  define('LINGOTEK_MIN_PLL_VERSION', '1.8');
20
  define('LINGOTEK_BASENAME', plugin_basename(__FILE__)); // plugin name as known by WP
21
  define('LINGOTEK_PLUGIN_SLUG', 'lingotek-translation');// plugin slug (should match above meta: Text Domain)
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://lingotek.com/
4
  Tags: automation, bilingual, international, language, Lingotek, localization, multilanguage, multilingual, translate, translation
5
  Requires at least: 3.8
6
  Tested up to: 4.7
7
- Stable tag: 1.2.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -122,6 +122,10 @@ For more, visit the [Lingotek documentation site](https://lingotek.atlassian.net
122
 
123
  == Changelog ==
124
 
 
 
 
 
125
  = 1.2.5 (2017-1-4) =
126
 
127
  * Added option to select the default behavior of new Custom Fields
4
  Tags: automation, bilingual, international, language, Lingotek, localization, multilanguage, multilingual, translate, translation
5
  Requires at least: 3.8
6
  Tested up to: 4.7
7
+ Stable tag: 1.2.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
122
 
123
  == Changelog ==
124
 
125
+ = 1.2.6 (2017-3-3) =
126
+
127
+ * Increased API timeout
128
+
129
  = 1.2.5 (2017-1-4) =
130
 
131
  * Added option to select the default behavior of new Custom Fields