Official MailerLite Sign Up Forms - Version 1.6.1

Version Description

  • Update - API client
Download this release

Release Info

Developer mailerlite
Plugin Icon 128x128 Official MailerLite Sign Up Forms
Version 1.6.1
Comparing to
See all releases

Code changes from version 1.6.0 to 1.6.1

mailerlite.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: MailerLite - Signup forms (official)
4
  * Description: Official MailerLite Signup forms plugin for WordPress. Ability to embed MailerLite webforms and create custom ones just with few clicks.
5
- * Version: 1.6.0
6
  * Author: MailerLite
7
  * Author URI: https://www.mailerlite.com
8
  * License: GPLv2 or later
@@ -33,7 +33,7 @@ define( 'MAILERLITE_PLUGIN_URL', plugins_url( '', __FILE__ ) );
33
  // Plugin basename
34
  define( 'MAILERLITE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
35
 
36
- define( 'MAILERLITE_VERSION', '1.6.0' );
37
 
38
  define( 'MAILERLITE_PHP_VERSION', '7.2.5' );
39
  define( 'MAILERLITE_WP_VERSION', '3.0.1' );
2
  /**
3
  * Plugin Name: MailerLite - Signup forms (official)
4
  * Description: Official MailerLite Signup forms plugin for WordPress. Ability to embed MailerLite webforms and create custom ones just with few clicks.
5
+ * Version: 1.6.1
6
  * Author: MailerLite
7
  * Author URI: https://www.mailerlite.com
8
  * License: GPLv2 or later
33
  // Plugin basename
34
  define( 'MAILERLITE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
35
 
36
+ define( 'MAILERLITE_VERSION', '1.6.1' );
37
 
38
  define( 'MAILERLITE_PHP_VERSION', '7.2.5' );
39
  define( 'MAILERLITE_WP_VERSION', '3.0.1' );
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: mailerlite, newsletter, subscribe, form, webform
5
  Requires at least: 3.0.1
6
  Tested up to: 6.0.2
7
  Requires PHP: 7.2.5
8
- Stable tag: 1.6.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -130,6 +130,9 @@ Add your custom CSS rules to the end of your theme stylesheet, /wp-content/theme
130
 
131
  == Changelog ==
132
 
 
 
 
133
  = 1.6.0 =
134
  * Compatibility updates
135
  * Tested up to latest WP version
5
  Requires at least: 3.0.1
6
  Tested up to: 6.0.2
7
  Requires PHP: 7.2.5
8
+ Stable tag: 1.6.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
130
 
131
  == Changelog ==
132
 
133
+ = 1.6.1 =
134
+ * Update - API client
135
+
136
  = 1.6.0 =
137
  * Compatibility updates
138
  * Tested up to latest WP version
src/Admin/Status.php CHANGED
@@ -76,8 +76,8 @@ class Status
76
  $fields[ $plugin_group ]['API key provided'] = (bool) get_option( 'mailerlite_api_key' ) ? 'Yes' : 'No';
77
 
78
  switch ( intval(get_option('mailerlite_platform', 0)) ) {
79
- case ApiType::CURRENT: $fields[$plugin_group]['API type'] = "MailerLite v2"; break;
80
- case ApiType::REWRITE: $fields[$plugin_group]['API type'] = "MailerLite API (Rewrite)"; break;
81
  case ApiType::INVALID:
82
  default : $fields[$plugin_group]['API type'] = "Not set"; break;
83
  }
76
  $fields[ $plugin_group ]['API key provided'] = (bool) get_option( 'mailerlite_api_key' ) ? 'Yes' : 'No';
77
 
78
  switch ( intval(get_option('mailerlite_platform', 0)) ) {
79
+ case ApiType::CURRENT: $fields[$plugin_group]['API type'] = "MailerLite Classic"; break;
80
+ case ApiType::REWRITE: $fields[$plugin_group]['API type'] = "MailerLite"; break;
81
  case ApiType::INVALID:
82
  default : $fields[$plugin_group]['API type'] = "Not set"; break;
83
  }
src/Admin/Views/SettingsView.php CHANGED
@@ -65,10 +65,10 @@ class SettingsView
65
 
66
  switch ((new PlatformAPI( $api_key ))->getApiType()) {
67
  case ApiType::CURRENT:
68
- echo __( "MailerLite v2 API", 'mailerlite' );
69
  break;
70
  case ApiType::REWRITE:
71
- echo __( "MailerLite API (Rewrite)", 'mailerlite' );
72
  break;
73
  default:
74
  echo __( "Don't know where to find it?", 'mailerlite' );
65
 
66
  switch ((new PlatformAPI( $api_key ))->getApiType()) {
67
  case ApiType::CURRENT:
68
+ echo __( "MailerLite Classic API", 'mailerlite' );
69
  break;
70
  case ApiType::REWRITE:
71
+ echo __( "MailerLite API", 'mailerlite' );
72
  break;
73
  default:
74
  echo __( "Don't know where to find it?", 'mailerlite' );
src/Api/PlatformAPI.php CHANGED
@@ -45,7 +45,7 @@ class PlatformAPI
45
  if ( $this->api_key == '')
46
  return ApiType::INVALID;
47
 
48
- if ( $this->isValidMd5Key() ) {
49
 
50
  return ApiType::CURRENT;
51
  }else{
@@ -217,8 +217,8 @@ class PlatformAPI
217
  * @return bool
218
  * @since 1.5.0
219
  */
220
- private function isValidMd5Key() {
221
 
222
- return strlen($this->api_key) == 32 && ctype_xdigit($this->api_key);
223
  }
224
  }
45
  if ( $this->api_key == '')
46
  return ApiType::INVALID;
47
 
48
+ if ( $this->isValidClassicKey() ) {
49
 
50
  return ApiType::CURRENT;
51
  }else{
217
  * @return bool
218
  * @since 1.5.0
219
  */
220
+ private function isValidClassicKey() {
221
 
222
+ return (strlen($this->api_key) < 100);
223
  }
224
  }