Lingotek Translation - Version 1.3.6

Version Description

Download this release

Release Info

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

Code changes from version 1.3.5 to 1.3.6

admin/admin.php CHANGED
@@ -318,19 +318,13 @@ class Lingotek_Admin {
318
  // connect cloak redirect.
319
  $connect = filter_input( INPUT_GET, 'connect' );
320
  if ( ! empty( $connect ) ) {
321
- // set sandbox or production (after button clicked).
322
- if ( 0 === strcasecmp( $connect,'sandbox' ) ) {
323
- update_option( 'lingotek_base_url', Lingotek_API::SANDBOX_URL );
324
- } else {
325
- update_option( 'lingotek_base_url', Lingotek_API::PRODUCTION_URL );
326
- }
327
  $client = new Lingotek_API();
328
  echo '<div class="wrap"><p class="description">' . esc_html( __( 'Redirecting to Lingotek to connect your account...','lingotek-translation' ) ) . '</p></div>';
329
 
330
  $connect_url = (0 === strcasecmp( $connect,'new' )) ? $client->get_new_url( $redirect_url ) : $client->get_connect_url( $redirect_url );
331
  }
332
  $connect_account_cloak_url_new = admin_url( 'admin.php?page=' . $this->plugin_slug . '_settings&connect=new' );
333
- $connect_account_cloak_url_test = admin_url( 'admin.php?page=' . $this->plugin_slug . '_settings&connect=sandbox' );
334
  $connect_account_cloak_url_prod = admin_url( 'admin.php?page=' . $this->plugin_slug . '_settings&connect=production' );
335
  include( LINGOTEK_ADMIN_INC . '/settings/connect-account.php' );
336
  }
318
  // connect cloak redirect.
319
  $connect = filter_input( INPUT_GET, 'connect' );
320
  if ( ! empty( $connect ) ) {
321
+ update_option( 'lingotek_base_url', Lingotek_API::PRODUCTION_URL );
 
 
 
 
 
322
  $client = new Lingotek_API();
323
  echo '<div class="wrap"><p class="description">' . esc_html( __( 'Redirecting to Lingotek to connect your account...','lingotek-translation' ) ) . '</p></div>';
324
 
325
  $connect_url = (0 === strcasecmp( $connect,'new' )) ? $client->get_new_url( $redirect_url ) : $client->get_connect_url( $redirect_url );
326
  }
327
  $connect_account_cloak_url_new = admin_url( 'admin.php?page=' . $this->plugin_slug . '_settings&connect=new' );
 
328
  $connect_account_cloak_url_prod = admin_url( 'admin.php?page=' . $this->plugin_slug . '_settings&connect=production' );
329
  include( LINGOTEK_ADMIN_INC . '/settings/connect-account.php' );
330
  }
admin/settings/connect-account.php CHANGED
@@ -34,6 +34,5 @@
34
  echo sprintf( wp_kses( __( 'Do you already have a Lingotek account? <a href="%s">Connect Lingotek Account</a>', 'lingotek-translation' ), $allowed_html ), esc_attr( $connect_account_cloak_url_prod ) )
35
  ?>
36
  </p>
37
- <p class="description"><?php echo sprintf( wp_kses( __( 'Do you have a Lingotek sandbox account? <a href="%s">Connect Sandbox Account</a>', 'lingotek-translation' ), $allowed_html ), esc_attr( $connect_account_cloak_url_test ) ) ?></p>
38
  </div>
39
  </div>
34
  echo sprintf( wp_kses( __( 'Do you already have a Lingotek account? <a href="%s">Connect Lingotek Account</a>', 'lingotek-translation' ), $allowed_html ), esc_attr( $connect_account_cloak_url_prod ) )
35
  ?>
36
  </p>
 
37
  </div>
38
  </div>
include/api.php CHANGED
@@ -15,7 +15,6 @@ class Lingotek_API extends Lingotek_HTTP {
15
  private $auth_temp;
16
 
17
  const PRODUCTION_URL = "https://myaccount.lingotek.com";
18
- const SANDBOX_URL = "https://cms.lingotek.com";
19
  const CLIENT_ID = "780966c9-f9c8-4691-96e2-c0aaf47f62ff";// Lingotek App ID
20
 
21
 
@@ -540,7 +539,7 @@ class Lingotek_API extends Lingotek_HTTP {
540
  $base_url = $this->base_url;
541
  $client_id = $this->client_id;
542
  if(!is_null($env)){
543
- $base_url = (strcasecmp($env,'SANDBOX') == 0) ? self::SANDBOX_URL : self::PRODUCTION_URL;
544
  }
545
  return $base_url . "/auth/authorize.html?client_id=" . $client_id . "&redirect_uri=" . urlencode($redirect_uri) . "&response_type=token";
546
  }
15
  private $auth_temp;
16
 
17
  const PRODUCTION_URL = "https://myaccount.lingotek.com";
 
18
  const CLIENT_ID = "780966c9-f9c8-4691-96e2-c0aaf47f62ff";// Lingotek App ID
19
 
20
 
539
  $base_url = $this->base_url;
540
  $client_id = $this->client_id;
541
  if(!is_null($env)){
542
+ $base_url = self::PRODUCTION_URL;
543
  }
544
  return $base_url . "/auth/authorize.html?client_id=" . $client_id . "&redirect_uri=" . urlencode($redirect_uri) . "&response_type=token";
545
  }
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.3.4
6
  Author: Lingotek and Frédéric Demarle
7
  Author uri: http://lingotek.com
8
  Description: Lingotek offers convenient cloud-based localization and translation.
@@ -16,7 +16,7 @@ if ( ! function_exists( 'add_action' ) ) {
16
  exit();
17
  }
18
 
19
- define( 'LINGOTEK_VERSION', '1.3.5' ); // plugin version (should match above meta).
20
  define( 'LINGOTEK_MIN_PLL_VERSION', '1.8' );
21
  define( 'LINGOTEK_BASENAME', plugin_basename( __FILE__ ) ); // plugin name as known by WP.
22
  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.3.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.
16
  exit();
17
  }
18
 
19
+ define( 'LINGOTEK_VERSION', '1.3.6' ); // plugin version (should match above meta).
20
  define( 'LINGOTEK_MIN_PLL_VERSION', '1.8' );
21
  define( 'LINGOTEK_BASENAME', plugin_basename( __FILE__ ) ); // plugin name as known by WP.
22
  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.9
7
- Stable tag: 1.3.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -124,6 +124,10 @@ For more, visit the [Lingotek documentation site](https://lingotek.atlassian.net
124
 
125
  = 1.3.5 (2018-2-8) =
126
 
 
 
 
 
127
  * Added option to the Preferences page to change the auto updater interval (Thanks to Soluto for contributing this)
128
  * Fixed errors caused by bulk action menus
129
 
4
  Tags: automation, bilingual, international, language, Lingotek, localization, multilanguage, multilingual, translate, translation
5
  Requires at least: 3.8
6
  Tested up to: 4.9
7
+ Stable tag: 1.3.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
124
 
125
  = 1.3.5 (2018-2-8) =
126
 
127
+ * Removed option to connect to Lingotek Sandbox environment
128
+
129
+ = 1.3.5 (2018-2-8) =
130
+
131
  * Added option to the Preferences page to change the auto updater interval (Thanks to Soluto for contributing this)
132
  * Fixed errors caused by bulk action menus
133