Official MailerLite Sign Up Forms - Version 1.1.15

Version Description

  • file_get_contents changed to cURL
Download this release

Release Info

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

Code changes from version 1.1.14 to 1.1.15

Files changed (3) hide show
  1. include/mailerlite-admin.php +15 -9
  2. mailerlite.php +2 -2
  3. readme.txt +5 -1
include/mailerlite-admin.php CHANGED
@@ -401,15 +401,21 @@ class MailerLite_Admin
401
 
402
  public static function update_account_info() {
403
  // request to mailerlite api
404
- $opts = array(
405
- 'http' => array(
406
- 'method' => "GET",
407
- 'header' => "X-MailerLite-ApiKey: " . self::$api_key . "\r\n"
408
- )
409
- );
410
- $context = stream_context_create($opts);
411
- $response = file_get_contents('https://api.mailerlite.com/api/v2', false, $context);
412
- $response = json_decode($response);
 
 
 
 
 
 
413
 
414
  if (!empty($response->account)) {
415
  update_option('account_id', $response->account->id);
401
 
402
  public static function update_account_info() {
403
  // request to mailerlite api
404
+ $ch = curl_init();
405
+
406
+ curl_setopt_array($ch, [
407
+ CURLOPT_URL => 'https://api.mailerlite.com/api/v2',
408
+ CURLOPT_RETURNTRANSFER => true,
409
+ CURLOPT_TIMEOUT => 30,
410
+ CURLOPT_HTTPHEADER => [
411
+ 'X-MailerLite-ApiKey: ' . self::$api_key
412
+ ]
413
+ ]);
414
+
415
+ $output = curl_exec($ch);
416
+ curl_close($ch);
417
+
418
+ $response = json_decode($output);
419
 
420
  if (!empty($response->account)) {
421
  update_option('account_id', $response->account->id);
mailerlite.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Official MailerLite Sign Up Forms
5
  * Description: Official MailerLite Sign Up Forms plugin for WordPress. Ability
6
  * to embed MailerLite webforms and create custom ones just with few clicks.
7
- * Version: 1.1.14
8
  * Author: MailerGroup
9
  * Author URI: https://www.mailerlite.com
10
  * License: GPLv2 or later
@@ -28,7 +28,7 @@
28
  define('MAILERLITE_PLUGIN_DIR', plugin_dir_path(__FILE__));
29
  define('MAILERLITE_PLUGIN_URL', plugins_url('', __FILE__));
30
 
31
- define('MAILERLITE_VERSION', '1.1.14');
32
 
33
  define('MAILERLITE_PHP_VERSION', '5.0.1');
34
  define('MAILERLITE_WP_VERSION', '3.0.1');
4
  * Plugin Name: Official MailerLite Sign Up Forms
5
  * Description: Official MailerLite Sign Up Forms plugin for WordPress. Ability
6
  * to embed MailerLite webforms and create custom ones just with few clicks.
7
+ * Version: 1.1.15
8
  * Author: MailerGroup
9
  * Author URI: https://www.mailerlite.com
10
  * License: GPLv2 or later
28
  define('MAILERLITE_PLUGIN_DIR', plugin_dir_path(__FILE__));
29
  define('MAILERLITE_PLUGIN_URL', plugins_url('', __FILE__));
30
 
31
+ define('MAILERLITE_VERSION', '1.1.15');
32
 
33
  define('MAILERLITE_PHP_VERSION', '5.0.1');
34
  define('MAILERLITE_WP_VERSION', '3.0.1');
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.mailerlite.com/
4
  Tags: mailerlite, newsletter, subscribe, form, webform
5
  Requires at least: 3.0.1
6
  Tested up to: 4.6
7
- Stable tag: 1.1.14
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -127,6 +127,8 @@ Add your custom CSS rules to the end of your theme stylesheet, /wp-content/theme
127
 
128
  == Changelog ==
129
 
 
 
130
  = 1.1.14 =
131
  * custom thank you message added
132
  = 1.1.13 =
@@ -198,6 +200,8 @@ Add your custom CSS rules to the end of your theme stylesheet, /wp-content/theme
198
 
199
  == Upgrade Notice ==
200
 
 
 
201
  = 1.1.14 =
202
  * custom thank you message added
203
  = 1.1.13 =
4
  Tags: mailerlite, newsletter, subscribe, form, webform
5
  Requires at least: 3.0.1
6
  Tested up to: 4.6
7
+ Stable tag: 1.1.15
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
127
 
128
  == Changelog ==
129
 
130
+ = 1.1.15 =
131
+ * file_get_contents changed to cURL
132
  = 1.1.14 =
133
  * custom thank you message added
134
  = 1.1.13 =
200
 
201
  == Upgrade Notice ==
202
 
203
+ = 1.1.15 =
204
+ * file_get_contents changed to cURL
205
  = 1.1.14 =
206
  * custom thank you message added
207
  = 1.1.13 =