Version Description
Current Version of Popup Builder is 3.43
Download this release
Release Info
Developer | Sygnoos |
Plugin | Popup Builder – Responsive WordPress Pop up |
Version | 3.44 |
Comparing to | |
See all releases |
Code changes from version 3.43 to 3.44
- com/classes/Actions.php +18 -3
- com/config/configPackage.php +1 -1
- com/helpers/AdminHelper.php +2 -1
- popup-builder.php +1 -1
- readme.txt +6 -1
com/classes/Actions.php
CHANGED
@@ -569,7 +569,22 @@ class Actions
|
|
569 |
$allAvailableShortcodes['patternLastName'] = '/\[Last name]/';
|
570 |
$allAvailableShortcodes['patternBlogName'] = '/\[Blog name]/';
|
571 |
$allAvailableShortcodes['patternUserName'] = '/\[User name]/';
|
572 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
573 |
|
574 |
// When email is not valid we don't continue
|
575 |
if (!preg_match('/^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$/', $fromEmail)) {
|
@@ -628,14 +643,14 @@ class Actions
|
|
628 |
$replacementUnsubscribe .= '?sgpbUnsubscribe='.md5($replacementId.$replacementEmail);
|
629 |
$replacementUnsubscribe .= '&email='.$subscriber['email'];
|
630 |
$replacementUnsubscribe .= '&popup='.$subscriptionFormId;
|
631 |
-
$replacementUnsubscribe = '<br><a href="'.$replacementUnsubscribe.'">'.
|
632 |
|
633 |
// Replace First name and Last name from email message
|
634 |
$emailMessageCustom = preg_replace($allAvailableShortcodes['patternFirstName'], $replacementFirstName, $emailMessage);
|
635 |
$emailMessageCustom = preg_replace($allAvailableShortcodes['patternLastName'], $replacementLastName, $emailMessageCustom);
|
636 |
$emailMessageCustom = preg_replace($allAvailableShortcodes['patternBlogName'], $replacementBlogName, $emailMessageCustom);
|
637 |
$emailMessageCustom = preg_replace($allAvailableShortcodes['patternUserName'], $replacementUserName, $emailMessageCustom);
|
638 |
-
$emailMessageCustom =
|
639 |
if (!empty($allAvailableShortcodes['extraShortcodesWithValues'])) {
|
640 |
$customFields = $allAvailableShortcodes['extraShortcodesWithValues'];
|
641 |
foreach ($customFields as $customFieldKey => $customFieldValue) {
|
569 |
$allAvailableShortcodes['patternLastName'] = '/\[Last name]/';
|
570 |
$allAvailableShortcodes['patternBlogName'] = '/\[Blog name]/';
|
571 |
$allAvailableShortcodes['patternUserName'] = '/\[User name]/';
|
572 |
+
|
573 |
+
$pattern = "/\[(\[?)(Unsubscribe)(?![\w-])([^\]\/]*(?:\/(?!\])[^\]\/]*)*?)(?:(\/)\]|\](?:([^\[]\*+(?:\[(?!\/\2\])[^\[]\*+)\*+)\[\/\2\])?)(\]?)/";
|
574 |
+
preg_match($pattern, $emailMessage, $matches);
|
575 |
+
$title = 'Unsubscribe';
|
576 |
+
if ($matches) {
|
577 |
+
$patternUnsubscribe = $matches[0];
|
578 |
+
// If user didn't change anything inside the [unsubscribe] shortcode $matches[2] will be equal to 'Unsubscribe'
|
579 |
+
if ($matches[2] == 'Unsubscribe') {
|
580 |
+
$pattern = '/\s(\w+?)="(.+?)"]/';
|
581 |
+
preg_match($pattern, $matches[0], $matchesTitle);
|
582 |
+
if (!empty($matchesTitle[2])) {
|
583 |
+
$title = AdminHelper::removeAllNonPrintableCharacters($matchesTitle[2], 'Unsubscribe');
|
584 |
+
}
|
585 |
+
}
|
586 |
+
$allAvailableShortcodes['patternUnsubscribe'] = $patternUnsubscribe;
|
587 |
+
}
|
588 |
|
589 |
// When email is not valid we don't continue
|
590 |
if (!preg_match('/^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$/', $fromEmail)) {
|
643 |
$replacementUnsubscribe .= '?sgpbUnsubscribe='.md5($replacementId.$replacementEmail);
|
644 |
$replacementUnsubscribe .= '&email='.$subscriber['email'];
|
645 |
$replacementUnsubscribe .= '&popup='.$subscriptionFormId;
|
646 |
+
$replacementUnsubscribe = '<br><a href="'.$replacementUnsubscribe.'">'.$title.'</a>';
|
647 |
|
648 |
// Replace First name and Last name from email message
|
649 |
$emailMessageCustom = preg_replace($allAvailableShortcodes['patternFirstName'], $replacementFirstName, $emailMessage);
|
650 |
$emailMessageCustom = preg_replace($allAvailableShortcodes['patternLastName'], $replacementLastName, $emailMessageCustom);
|
651 |
$emailMessageCustom = preg_replace($allAvailableShortcodes['patternBlogName'], $replacementBlogName, $emailMessageCustom);
|
652 |
$emailMessageCustom = preg_replace($allAvailableShortcodes['patternUserName'], $replacementUserName, $emailMessageCustom);
|
653 |
+
$emailMessageCustom = str_replace($allAvailableShortcodes['patternUnsubscribe'], $replacementUnsubscribe, $emailMessageCustom);
|
654 |
if (!empty($allAvailableShortcodes['extraShortcodesWithValues'])) {
|
655 |
$customFields = $allAvailableShortcodes['extraShortcodesWithValues'];
|
656 |
foreach ($customFields as $customFieldKey => $customFieldValue) {
|
com/config/configPackage.php
CHANGED
@@ -3,6 +3,6 @@ if (!defined('ABSPATH')) {
|
|
3 |
exit();
|
4 |
}
|
5 |
|
6 |
-
define('SG_POPUP_VERSION', '3.
|
7 |
define('SGPB_POPUP_PKG', SGPB_POPUP_PKG_FREE);
|
8 |
define('POPUP_BUILDER_BASENAME', 'popupbuilder-platinum/popup-builder.php');
|
3 |
exit();
|
4 |
}
|
5 |
|
6 |
+
define('SG_POPUP_VERSION', '3.44');
|
7 |
define('SGPB_POPUP_PKG', SGPB_POPUP_PKG_FREE);
|
8 |
define('POPUP_BUILDER_BASENAME', 'popupbuilder-platinum/popup-builder.php');
|
com/helpers/AdminHelper.php
CHANGED
@@ -1758,7 +1758,8 @@ class AdminHelper
|
|
1758 |
$title = preg_replace($pattern, '', $title);
|
1759 |
$title = mb_ereg_replace($pattern, '', $title);
|
1760 |
$title = htmlspecialchars($title, ENT_IGNORE, 'UTF-8');
|
1761 |
-
|
|
|
1762 |
$titleRes = $defaultValue;
|
1763 |
}
|
1764 |
|
1758 |
$title = preg_replace($pattern, '', $title);
|
1759 |
$title = mb_ereg_replace($pattern, '', $title);
|
1760 |
$title = htmlspecialchars($title, ENT_IGNORE, 'UTF-8');
|
1761 |
+
$result = str_replace(' ', '', $title);
|
1762 |
+
if (empty($result)) {
|
1763 |
$titleRes = $defaultValue;
|
1764 |
}
|
1765 |
|
popup-builder.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Popup Builder
|
4 |
* Plugin URI: https://popup-builder.com
|
5 |
* Description: The most complete popup plugin. Html, image, iframe, shortcode, video and many other popup types. Manage popup dimensions, effects, themes and more.
|
6 |
-
* Version: 3.
|
7 |
* Author: Sygnoos
|
8 |
* Author URI: https://sygnoos.com
|
9 |
* License: GPLv2
|
3 |
* Plugin Name: Popup Builder
|
4 |
* Plugin URI: https://popup-builder.com
|
5 |
* Description: The most complete popup plugin. Html, image, iframe, shortcode, video and many other popup types. Manage popup dimensions, effects, themes and more.
|
6 |
+
* Version: 3.44
|
7 |
* Author: Sygnoos
|
8 |
* Author URI: https://sygnoos.com
|
9 |
* License: GPLv2
|
readme.txt
CHANGED
@@ -9,7 +9,7 @@ Tags: popup, pop up, wordpress popup, popup maker, exit popup, popup builder, wo
|
|
9 |
Requires at least: 3.8
|
10 |
Tested up to: 5.3
|
11 |
Requires PHP: 5.3.3
|
12 |
-
Stable tag: 3.
|
13 |
License: GPLv2 or later
|
14 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
15 |
|
@@ -185,6 +185,11 @@ Go to the Popup Builder settings and set your desired options.
|
|
185 |
|
186 |
== Changelog ==
|
187 |
|
|
|
|
|
|
|
|
|
|
|
188 |
= Version 3.43 =
|
189 |
* Iframes (dimensions) in html works correctly, with correct sizes and without scroll issue.
|
190 |
* Don't show again button added in license notice banner.
|
9 |
Requires at least: 3.8
|
10 |
Tested up to: 5.3
|
11 |
Requires PHP: 5.3.3
|
12 |
+
Stable tag: 3.44
|
13 |
License: GPLv2 or later
|
14 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
15 |
|
185 |
|
186 |
== Changelog ==
|
187 |
|
188 |
+
= Version 3.44 =
|
189 |
+
* Code optimization and typo fixes.
|
190 |
+
* Bug fixed, related to Unsubscribe link in the newsletter.
|
191 |
+
* Bug fixed related to unavailability to close the banner.
|
192 |
+
|
193 |
= Version 3.43 =
|
194 |
* Iframes (dimensions) in html works correctly, with correct sizes and without scroll issue.
|
195 |
* Don't show again button added in license notice banner.
|