Official MailerLite Sign Up Forms - Version 1.0.18

Version Description

  • added php,wordpress and curl version checks before activation
Download this release

Release Info

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

Code changes from version 1.0.17 to 1.0.18

Files changed (2) hide show
  1. mailerlite.php +29 -2
  2. readme.txt +6 -2
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.0.17
8
  * Author: MailerGroup
9
  * Author URI: https://www.mailerlite.com
10
  * License: GPLv2 or later
@@ -28,7 +28,10 @@
28
  define('MAILERLITE_PLUGIN_DIR', plugin_dir_path(__FILE__));
29
  define('MAILERLITE_PLUGIN_URL', plugins_url('', __FILE__));
30
 
31
- define('MAILERLITE_VERSION', '1.0.17');
 
 
 
32
 
33
  function mailerlite_load_plugin_textdomain()
34
  {
@@ -44,8 +47,32 @@ add_action('init', 'mailerlite_load_plugin_textdomain');
44
 
45
  function mailerlite_install()
46
  {
 
47
  global $wpdb;
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  $table_name = $wpdb->prefix . "mailerlite_forms";
50
 
51
  //$charset_collate = $wpdb->get_charset_collate();
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.0.18
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.0.18');
32
+
33
+ define('MAILERLITE_PHP_VERSION', '5.0.1');
34
+ define('MAILERLITE_WP_VERSION', '3.0.1');
35
 
36
  function mailerlite_load_plugin_textdomain()
37
  {
47
 
48
  function mailerlite_install()
49
  {
50
+ global $wp_version;
51
  global $wpdb;
52
 
53
+ $message = '';
54
+
55
+ if ( version_compare( PHP_VERSION, MAILERLITE_PHP_VERSION, '<' ) )
56
+ {
57
+ $message = '<p> The <strong>MailerLite</strong> plugin requires PHP version '.MAILERLITE_PHP_VERSION.' or greater.</p>';
58
+ }
59
+
60
+ if (version_compare( $wp_version, MAILERLITE_WP_VERSION, '<' ))
61
+ {
62
+ $message = '<p> The <strong>MailerLite</strong> plugin requires WordPress version '.MAILERLITE_WP_VERSION.' or greater.</p>';
63
+ }
64
+
65
+ if (!function_exists('curl_version'))
66
+ {
67
+ $message = '<p> The <strong>MailerLite</strong> plugin requires <strong>php-curl</strong> library. Please visit <a target="_blank" href="http://php.net/curl">php.net/curl</a></p>';
68
+ }
69
+
70
+ if ($message)
71
+ {
72
+ deactivate_plugins( basename( __FILE__ ) );
73
+ wp_die($message, 'Plugin Activation Error', array('response' => 200, 'back_link' => TRUE));
74
+ }
75
+
76
  $table_name = $wpdb->prefix . "mailerlite_forms";
77
 
78
  //$charset_collate = $wpdb->get_charset_collate();
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.3.1
7
- Stable tag: 1.0.17
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -59,7 +59,7 @@ Plugin features:
59
 
60
  = Requirements =
61
 
62
- * Requires PHP5.
63
 
64
  = What is the plugin license? =
65
 
@@ -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.0.17 =
131
  * fix db queries for update
132
  = 1.0.16 =
@@ -166,6 +168,8 @@ Add your custom CSS rules to the end of your theme stylesheet, /wp-content/theme
166
 
167
  == Upgrade Notice ==
168
 
 
 
169
  = 1.0.17 =
170
  * fix db queries for update
171
  = 1.0.16 =
4
  Tags: mailerlite, newsletter, subscribe, form, webform
5
  Requires at least: 3.0.1
6
  Tested up to: 4.3.1
7
+ Stable tag: 1.0.18
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
59
 
60
  = Requirements =
61
 
62
+ * Requires PHP5 and CURL.
63
 
64
  = What is the plugin license? =
65
 
127
 
128
  == Changelog ==
129
 
130
+ = 1.0.18 =
131
+ * added php,wordpress and curl version checks before activation
132
  = 1.0.17 =
133
  * fix db queries for update
134
  = 1.0.16 =
168
 
169
  == Upgrade Notice ==
170
 
171
+ = 1.0.18 =
172
+ * added php,wordpress and curl version checks before activation
173
  = 1.0.17 =
174
  * fix db queries for update
175
  = 1.0.16 =