Official MailerLite Sign Up Forms - Version 1.4.1

Version Description

  • Tweak - WordPress 5.2 and PHP 7.2 support
Download this release

Release Info

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

Code changes from version 1.4 to 1.4.1

Files changed (3) hide show
  1. include/mailerlite-admin.php +6 -4
  2. mailerlite.php +11 -11
  3. readme.txt +5 -2
include/mailerlite-admin.php CHANGED
@@ -224,10 +224,12 @@ class MailerLite_Admin {
224
  $form->data = unserialize( $form->data );
225
 
226
  if ( $form->type == MailerLite_Form::TYPE_CUSTOM ) {
227
- add_filter(
228
- 'wp_default_editor',
229
- create_function( '', 'return "tinymce";' )
230
- );
 
 
231
 
232
  $ML_Groups = new MailerLite_Forms_Groups( $api_key );
233
 
224
  $form->data = unserialize( $form->data );
225
 
226
  if ( $form->type == MailerLite_Form::TYPE_CUSTOM ) {
227
+ add_filter(
228
+ 'wp_default_editor',
229
+ function () {
230
+ return "tinymce";
231
+ }
232
+ );
233
 
234
  $ML_Groups = new MailerLite_Forms_Groups( $api_key );
235
 
mailerlite.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Plugin Name: Official MailerLite Sign Up Forms
5
  * Description: Official MailerLite Sign Up Forms plugin for WordPress. Ability to embed MailerLite webforms and create custom ones just with few clicks.
6
- * Version: 1.4
7
  * Author: MailerGroup
8
  * Author URI: https://www.mailerlite.com
9
  * License: GPLv2 or later
@@ -29,7 +29,7 @@
29
  define( 'MAILERLITE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
30
  define( 'MAILERLITE_PLUGIN_URL', plugins_url( '', __FILE__ ) );
31
 
32
- define( 'MAILERLITE_VERSION', '1.4' );
33
 
34
  define( 'MAILERLITE_PHP_VERSION', '5.6.0' );
35
  define( 'MAILERLITE_WP_VERSION', '3.0.1' );
@@ -62,7 +62,7 @@ function mailerlite_install() {
62
 
63
  if ( $message ) {
64
  deactivate_plugins( basename( __FILE__ ) );
65
- wp_die( $message, 'Plugin Activation Error', [ 'response' => 200, 'back_link' => true ] );
66
  }
67
 
68
  $table_name = $wpdb->base_prefix . "mailerlite_forms";
@@ -98,7 +98,7 @@ register_activation_hook( __FILE__, 'mailerlite_install' );
98
  function register_mailerlite_styles() {
99
  wp_register_style(
100
  'mailerlite_forms.css',
101
- MAILERLITE_PLUGIN_URL . '/assets/css/mailerlite_forms.css', [],
102
  MAILERLITE_VERSION
103
  );
104
  wp_enqueue_style( 'mailerlite_forms.css' );
@@ -159,7 +159,7 @@ function mailerlite_status_information() {
159
  $environment_group = __( 'Environment', 'mailerlite' );
160
  $plugin_group = __( 'Plugin', 'mailerlite' );
161
 
162
- $fields = [];
163
  $fields['WordPress']['Version'] = get_bloginfo( 'version' );
164
  $fields['WordPress']['Home URL'] = get_option( 'home' );
165
  $fields['WordPress']['Site URL'] = get_option( 'home' );
@@ -196,17 +196,17 @@ if ( in_array( 'official-mailerlite-sign-up-forms/mailerlite.php', get_option( '
196
  require_once( MAILERLITE_PLUGIN_DIR . 'include/mailerlite-admin.php' );
197
  require_once( MAILERLITE_PLUGIN_DIR . 'include/mailerlite-admin-status.php' );
198
 
199
- add_action( 'init', [ 'MailerLite_Admin', 'init' ] );
200
- add_action( 'init', [ 'MailerLite_Admin_Status', 'init' ] );
201
  }
202
 
203
  require_once( MAILERLITE_PLUGIN_DIR . 'include/mailerlite-widget.php' );
204
  require_once( MAILERLITE_PLUGIN_DIR . 'include/mailerlite-shortcode.php' );
205
  require_once( MAILERLITE_PLUGIN_DIR . 'include/mailerlite-gutenberg.php' );
206
 
207
- add_action( 'init', [ 'MailerLite_Shortcode', 'init' ] );
208
- add_action( 'init', [ 'MailerLite_Form', 'init' ] );
209
- add_action( 'init', [ 'MailerLite_Gutenberg', 'init' ] );
210
  } else {
211
  function mailerlite_old_php_notice() {
212
  $class = 'notice notice-error';
@@ -218,6 +218,6 @@ if ( in_array( 'official-mailerlite-sign-up-forms/mailerlite.php', get_option( '
218
  add_action( 'admin_notices', 'mailerlite_old_php_notice' );
219
 
220
  require_once( MAILERLITE_PLUGIN_DIR . 'include/mailerlite-admin-status.php' );
221
- add_action( 'init', [ 'MailerLite_Admin_Status', 'init' ] );
222
  }
223
  }
3
  /**
4
  * Plugin Name: Official MailerLite Sign Up Forms
5
  * Description: Official MailerLite Sign Up Forms plugin for WordPress. Ability to embed MailerLite webforms and create custom ones just with few clicks.
6
+ * Version: 1.4.1
7
  * Author: MailerGroup
8
  * Author URI: https://www.mailerlite.com
9
  * License: GPLv2 or later
29
  define( 'MAILERLITE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
30
  define( 'MAILERLITE_PLUGIN_URL', plugins_url( '', __FILE__ ) );
31
 
32
+ define( 'MAILERLITE_VERSION', '1.4.1' );
33
 
34
  define( 'MAILERLITE_PHP_VERSION', '5.6.0' );
35
  define( 'MAILERLITE_WP_VERSION', '3.0.1' );
62
 
63
  if ( $message ) {
64
  deactivate_plugins( basename( __FILE__ ) );
65
+ wp_die( $message, 'Plugin Activation Error', array( 'response' => 200, 'back_link' => true ) );
66
  }
67
 
68
  $table_name = $wpdb->base_prefix . "mailerlite_forms";
98
  function register_mailerlite_styles() {
99
  wp_register_style(
100
  'mailerlite_forms.css',
101
+ MAILERLITE_PLUGIN_URL . '/assets/css/mailerlite_forms.css', array(),
102
  MAILERLITE_VERSION
103
  );
104
  wp_enqueue_style( 'mailerlite_forms.css' );
159
  $environment_group = __( 'Environment', 'mailerlite' );
160
  $plugin_group = __( 'Plugin', 'mailerlite' );
161
 
162
+ $fields = array();
163
  $fields['WordPress']['Version'] = get_bloginfo( 'version' );
164
  $fields['WordPress']['Home URL'] = get_option( 'home' );
165
  $fields['WordPress']['Site URL'] = get_option( 'home' );
196
  require_once( MAILERLITE_PLUGIN_DIR . 'include/mailerlite-admin.php' );
197
  require_once( MAILERLITE_PLUGIN_DIR . 'include/mailerlite-admin-status.php' );
198
 
199
+ add_action( 'init', array( 'MailerLite_Admin', 'init' ) );
200
+ add_action( 'init', array( 'MailerLite_Admin_Status', 'init' ) );
201
  }
202
 
203
  require_once( MAILERLITE_PLUGIN_DIR . 'include/mailerlite-widget.php' );
204
  require_once( MAILERLITE_PLUGIN_DIR . 'include/mailerlite-shortcode.php' );
205
  require_once( MAILERLITE_PLUGIN_DIR . 'include/mailerlite-gutenberg.php' );
206
 
207
+ add_action( 'init', array( 'MailerLite_Shortcode', 'init' ) );
208
+ add_action( 'init', array( 'MailerLite_Form', 'init' ) );
209
+ add_action( 'init', array( 'MailerLite_Gutenberg', 'init' ) );
210
  } else {
211
  function mailerlite_old_php_notice() {
212
  $class = 'notice notice-error';
218
  add_action( 'admin_notices', 'mailerlite_old_php_notice' );
219
 
220
  require_once( MAILERLITE_PLUGIN_DIR . 'include/mailerlite-admin-status.php' );
221
+ add_action( 'init', array( 'MailerLite_Admin_Status', 'init' ) );
222
  }
223
  }
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: mailerlite
3
  Donate link: https://www.mailerlite.com/
4
  Tags: mailerlite, newsletter, subscribe, form, webform
5
  Requires at least: 3.0.1
6
- Tested up to: 5.0.2
7
  Requires PHP: 5.6.0
8
- Stable tag: 1.4
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.4 =
134
  * Tweak - Show more than 100 groups when creating a custom form
135
  * Tweak - Renamed some classes to avoid fatal errors from other plugin having the same class names
3
  Donate link: https://www.mailerlite.com/
4
  Tags: mailerlite, newsletter, subscribe, form, webform
5
  Requires at least: 3.0.1
6
+ Tested up to: 5.2
7
  Requires PHP: 5.6.0
8
+ Stable tag: 1.4.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.4.1 =
134
+ * Tweak - WordPress 5.2 and PHP 7.2 support
135
+
136
  = 1.4 =
137
  * Tweak - Show more than 100 groups when creating a custom form
138
  * Tweak - Renamed some classes to avoid fatal errors from other plugin having the same class names