Version Description
- option to activate popup form
Download this release
Release Info
Developer | mailerlite |
Plugin | Official MailerLite Sign Up Forms |
Version | 1.1.7 |
Comparing to | |
See all releases |
Code changes from version 1.1.6 to 1.1.7
- include/mailerlite-admin.php +8 -4
- include/mailerlite-form.php +2 -1
- include/templates/admin/main.php +26 -0
- mailerlite.php +2 -2
- readme.txt +5 -1
include/mailerlite-admin.php
CHANGED
@@ -23,7 +23,7 @@ class MailerLite_Admin
|
|
23 |
|
24 |
$account_id = get_option('account_id');
|
25 |
$account_subdomain = get_option('account_subdomain');
|
26 |
-
|
27 |
if (self::$api_key && (!$account_id || !$account_subdomain)) {
|
28 |
self::update_account_info();
|
29 |
}
|
@@ -115,6 +115,10 @@ class MailerLite_Admin
|
|
115 |
*/
|
116 |
public static function mailerlite_main()
|
117 |
{
|
|
|
|
|
|
|
|
|
118 |
global $fields, $lists, $form, $forms_data, $webforms, $mailerlite_error, $result, $wpdb;
|
119 |
|
120 |
//Check for api key
|
@@ -380,11 +384,10 @@ class MailerLite_Admin
|
|
380 |
$mailerlite_error = __('Wrong MailerLite API key', 'mailerlite');
|
381 |
} else {
|
382 |
update_option('mailerlite_api_key', $key);
|
383 |
-
|
384 |
-
self::update_account_info();
|
385 |
-
|
386 |
update_option('mailerlite_enabled', true);
|
387 |
self::$api_key = $key;
|
|
|
|
|
388 |
}
|
389 |
}
|
390 |
|
@@ -403,6 +406,7 @@ class MailerLite_Admin
|
|
403 |
if (!empty($response->account)) {
|
404 |
update_option('account_id', $response->account->id);
|
405 |
update_option('account_subdomain', $response->account->subdomain);
|
|
|
406 |
}
|
407 |
}
|
408 |
|
23 |
|
24 |
$account_id = get_option('account_id');
|
25 |
$account_subdomain = get_option('account_subdomain');
|
26 |
+
|
27 |
if (self::$api_key && (!$account_id || !$account_subdomain)) {
|
28 |
self::update_account_info();
|
29 |
}
|
115 |
*/
|
116 |
public static function mailerlite_main()
|
117 |
{
|
118 |
+
if (isset($_GET['mailerlite_popups_disabled'])) {
|
119 |
+
update_option('mailerlite_popups_disabled', !!$_GET['mailerlite_popups_disabled']);
|
120 |
+
}
|
121 |
+
|
122 |
global $fields, $lists, $form, $forms_data, $webforms, $mailerlite_error, $result, $wpdb;
|
123 |
|
124 |
//Check for api key
|
384 |
$mailerlite_error = __('Wrong MailerLite API key', 'mailerlite');
|
385 |
} else {
|
386 |
update_option('mailerlite_api_key', $key);
|
|
|
|
|
|
|
387 |
update_option('mailerlite_enabled', true);
|
388 |
self::$api_key = $key;
|
389 |
+
|
390 |
+
self::update_account_info();
|
391 |
}
|
392 |
}
|
393 |
|
406 |
if (!empty($response->account)) {
|
407 |
update_option('account_id', $response->account->id);
|
408 |
update_option('account_subdomain', $response->account->subdomain);
|
409 |
+
update_option('mailerlite_popups_disabled', false);
|
410 |
}
|
411 |
}
|
412 |
|
include/mailerlite-form.php
CHANGED
@@ -231,7 +231,8 @@ function mailerlite_universal() { ?>
|
|
231 |
$mailerlite_api_key = get_option('mailerlite_api_key');
|
232 |
$account_id = get_option('account_id');
|
233 |
$account_subdomain = get_option('account_subdomain');
|
|
|
234 |
|
235 |
-
if ($mailerlite_api_key && $account_id && $account_subdomain) {
|
236 |
add_action('wp_head', 'mailerlite_universal');
|
237 |
}
|
231 |
$mailerlite_api_key = get_option('mailerlite_api_key');
|
232 |
$account_id = get_option('account_id');
|
233 |
$account_subdomain = get_option('account_subdomain');
|
234 |
+
$mailerlite_popups_disabled = get_option('mailerlite_popups_disabled');
|
235 |
|
236 |
+
if (!$mailerlite_popups_disabled && $mailerlite_api_key && $account_id && $account_subdomain) {
|
237 |
add_action('wp_head', 'mailerlite_universal');
|
238 |
}
|
include/templates/admin/main.php
CHANGED
@@ -1,6 +1,32 @@
|
|
1 |
<?php defined('ABSPATH') or die("No direct access allowed!"); ?>
|
2 |
<?php include_once('header.php'); ?>
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
<div class="wrap columns-2 dd-wrap">
|
5 |
<h2><?php echo __('Signup forms', 'mailerlite'); ?> <a
|
6 |
href="<?php echo admin_url('admin.php?page=mailerlite_main&view=create'); ?>"
|
1 |
<?php defined('ABSPATH') or die("No direct access allowed!"); ?>
|
2 |
<?php include_once('header.php'); ?>
|
3 |
|
4 |
+
<div class="wrap columns-2 dd-wrap">
|
5 |
+
<h2>Popup forms</h2>
|
6 |
+
<div class="popup-descriptipn"
|
7 |
+
style="background: #ffffff; margin: 10px 0px 10px 0px; padding: 15px; border: 1px solid #e1e1e1;">
|
8 |
+
<?php if (!get_option('mailerlite_popups_disabled')) { ?>
|
9 |
+
<p style="margin: 0px 0px 10px 0px;">
|
10 |
+
<strong>MailerLite tracking script is enabled.</strong> Want to <a
|
11 |
+
style="color: #666666" href="<?php echo admin_url('admin.php?page=mailerlite_main&mailerlite_popups_disabled=1'); ?>">turn it off?</a>
|
12 |
+
</p>
|
13 |
+
<p></p>
|
14 |
+
<p style="margin: 0px 0px 0px 0px;">
|
15 |
+
Create popup forms in your MailerLite account and it will be displayed
|
16 |
+
in your blog.
|
17 |
+
</p>
|
18 |
+
<?php } else { ?>
|
19 |
+
<p style="margin: 0px 0px 10px 0px;">
|
20 |
+
<strong>MailerLite tracking script is disabled.</strong> Want to <a href="<?php echo admin_url('admin.php?page=mailerlite_main&mailerlite_popups_disabled=0'); ?>" style="color: #666666">turn it on?</a>
|
21 |
+
</p>
|
22 |
+
<p></p>
|
23 |
+
<p style="margin: 0px 0px 0px 0px;">Your popup forms won't be displayed while the tracking script is
|
24 |
+
disabled.
|
25 |
+
</p>
|
26 |
+
<?php } ?>
|
27 |
+
</div>
|
28 |
+
</div>
|
29 |
+
|
30 |
<div class="wrap columns-2 dd-wrap">
|
31 |
<h2><?php echo __('Signup forms', 'mailerlite'); ?> <a
|
32 |
href="<?php echo admin_url('admin.php?page=mailerlite_main&view=create'); ?>"
|
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.
|
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.
|
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.7
|
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.7');
|
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.5.1
|
7 |
-
Stable tag: 1.1.
|
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.6 =
|
131 |
* popup webforms added
|
132 |
= 1.1.5 =
|
@@ -182,6 +184,8 @@ Add your custom CSS rules to the end of your theme stylesheet, /wp-content/theme
|
|
182 |
|
183 |
== Upgrade Notice ==
|
184 |
|
|
|
|
|
185 |
= 1.1.6 =
|
186 |
* popup webforms added
|
187 |
= 1.1.5 =
|
4 |
Tags: mailerlite, newsletter, subscribe, form, webform
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 4.5.1
|
7 |
+
Stable tag: 1.1.7
|
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.7 =
|
131 |
+
* option to activate popup form
|
132 |
= 1.1.6 =
|
133 |
* popup webforms added
|
134 |
= 1.1.5 =
|
184 |
|
185 |
== Upgrade Notice ==
|
186 |
|
187 |
+
= 1.1.7 =
|
188 |
+
* option to activate popup form
|
189 |
= 1.1.6 =
|
190 |
* popup webforms added
|
191 |
= 1.1.5 =
|