Version Description
Download this release
Release Info
Developer | Sygnoos |
Plugin | Popup Builder – Responsive WordPress Pop up |
Version | 4.1.3 |
Comparing to | |
See all releases |
Code changes from version 4.1.2 to 4.1.3
- com/classes/Actions.php +1 -1
- com/config/configPackage.php +1 -1
- com/helpers/AdminHelper.php +29 -3
- popup-builder.php +1 -1
- readme.txt +5 -2
com/classes/Actions.php
CHANGED
@@ -792,7 +792,7 @@ class Actions
|
|
792 |
|
793 |
$subscribers = apply_filters('sgpNewsletterSendingSubscribers', $subscribers);
|
794 |
|
795 |
-
$blogInfo = get_bloginfo();
|
796 |
$headers = array(
|
797 |
'From: "'.$blogInfo.'" <'.$fromEmail.'>' ,
|
798 |
'MIME-Version: 1.0' ,
|
792 |
|
793 |
$subscribers = apply_filters('sgpNewsletterSendingSubscribers', $subscribers);
|
794 |
|
795 |
+
$blogInfo = wp_specialchars_decode( get_bloginfo() );
|
796 |
$headers = array(
|
797 |
'From: "'.$blogInfo.'" <'.$fromEmail.'>' ,
|
798 |
'MIME-Version: 1.0' ,
|
com/config/configPackage.php
CHANGED
@@ -3,6 +3,6 @@ if (!defined('ABSPATH')) {
|
|
3 |
exit();
|
4 |
}
|
5 |
|
6 |
-
define('SG_POPUP_VERSION', '4.1.
|
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', '4.1.3');
|
7 |
define('SGPB_POPUP_PKG', SGPB_POPUP_PKG_FREE);
|
8 |
define('POPUP_BUILDER_BASENAME', 'popupbuilder-platinum/popup-builder.php');
|
com/helpers/AdminHelper.php
CHANGED
@@ -1196,7 +1196,7 @@ class AdminHelper
|
|
1196 |
{
|
1197 |
$contentType = 'text/html';
|
1198 |
$charset = 'UTF-8';
|
1199 |
-
$blogInfo = get_bloginfo();
|
1200 |
|
1201 |
if (!empty($args['contentType'])) {
|
1202 |
$contentType = $args['contentType'];
|
@@ -2053,7 +2053,7 @@ class AdminHelper
|
|
2053 |
$mailSubject = $newsletterData['newsletterSubject'];
|
2054 |
$fromEmail = $newsletterData['fromEmail'];
|
2055 |
$emailMessage = $newsletterData['messageBody'];
|
2056 |
-
$blogInfo =
|
2057 |
$headers = array(
|
2058 |
'From: "'.$blogInfo.'" <'.$fromEmail.'>' ,
|
2059 |
'MIME-Version: 1.0' ,
|
@@ -2075,7 +2075,33 @@ class AdminHelper
|
|
2075 |
$emails = $receiverEmailsArray;
|
2076 |
}
|
2077 |
|
2078 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2079 |
|
2080 |
wp_die(esc_html($newsletterData['testSendingStatus']));
|
2081 |
}
|
1196 |
{
|
1197 |
$contentType = 'text/html';
|
1198 |
$charset = 'UTF-8';
|
1199 |
+
$blogInfo = wp_specialchars_decode( get_bloginfo() );
|
1200 |
|
1201 |
if (!empty($args['contentType'])) {
|
1202 |
$contentType = $args['contentType'];
|
2053 |
$mailSubject = $newsletterData['newsletterSubject'];
|
2054 |
$fromEmail = $newsletterData['fromEmail'];
|
2055 |
$emailMessage = $newsletterData['messageBody'];
|
2056 |
+
$blogInfo = wp_specialchars_decode( get_option( 'blogname' ) );
|
2057 |
$headers = array(
|
2058 |
'From: "'.$blogInfo.'" <'.$fromEmail.'>' ,
|
2059 |
'MIME-Version: 1.0' ,
|
2075 |
$emails = $receiverEmailsArray;
|
2076 |
}
|
2077 |
|
2078 |
+
$newsletterOptions = get_option('SGPB_NEWSLETTER_DATA');
|
2079 |
+
$allAvailableShortcodes = array();
|
2080 |
+
$allAvailableShortcodes['patternBlogName'] = '/\[Blog name]/';
|
2081 |
+
$allAvailableShortcodes['patternUserName'] = '/\[User name]/';
|
2082 |
+
$allAvailableShortcodes['patternUnsubscribe'] = '';
|
2083 |
+
|
2084 |
+
$pattern = "/\[(\[?)(Unsubscribe)(?![\w-])([^\]\/]*(?:\/(?!\])[^\]\/]*)*?)(?:(\/)\]|\](?:([^\[]\*+(?:\[(?!\/\2\])[^\[]\*+)\*+)\[\/\2\])?)(\]?)/";
|
2085 |
+
preg_match($pattern, $emailMessage, $matches);
|
2086 |
+
$title = __('Unsubscribe', SG_POPUP_TEXT_DOMAIN);
|
2087 |
+
if ($matches) {
|
2088 |
+
$patternUnsubscribe = $matches[0];
|
2089 |
+
// If user didn't change anything inside the [unsubscribe] shortcode $matches[2] will be equal to 'Unsubscribe'
|
2090 |
+
if ($matches[2] == 'Unsubscribe') {
|
2091 |
+
$pattern = '/\s(\w+?)="(.+?)"]/';
|
2092 |
+
preg_match($pattern, $matches[0], $matchesTitle);
|
2093 |
+
if (!empty($matchesTitle[2])) {
|
2094 |
+
$title = AdminHelper::removeAllNonPrintableCharacters($matchesTitle[2], 'Unsubscribe');
|
2095 |
+
}
|
2096 |
+
}
|
2097 |
+
$allAvailableShortcodes['patternUnsubscribe'] = $patternUnsubscribe;
|
2098 |
+
}
|
2099 |
+
|
2100 |
+
$emailMessageCustom = preg_replace($allAvailableShortcodes['patternBlogName'], $newsletterOptions['blogname'], $emailMessage);
|
2101 |
+
$emailMessageCustom = preg_replace($allAvailableShortcodes['patternUserName'], $newsletterOptions['username'], $emailMessageCustom);
|
2102 |
+
$emailMessageCustom = str_replace($allAvailableShortcodes['patternUnsubscribe'], '', $emailMessageCustom);
|
2103 |
+
|
2104 |
+
$mailStatus = wp_mail($emails, $mailSubject, $emailMessageCustom, $headers);
|
2105 |
|
2106 |
wp_die(esc_html($newsletterData['testSendingStatus']));
|
2107 |
}
|
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: 4.1.
|
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: 4.1.3
|
7 |
* Author: Sygnoos
|
8 |
* Author URI: https://sygnoos.com
|
9 |
* License: GPLv2
|
readme.txt
CHANGED
@@ -8,7 +8,7 @@ Tags: popup, pop up, wordpress popup, popup maker, exit popup, popup builder, wo
|
|
8 |
Requires at least: 4.2
|
9 |
Tested up to: 5.9
|
10 |
Requires PHP: 5.3.3
|
11 |
-
Stable tag: 4.1.
|
12 |
License: GPLv2 or later
|
13 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
14 |
|
@@ -145,6 +145,9 @@ Go to the Popup Builder settings and set your desired options.
|
|
145 |
|
146 |
== Changelog ==
|
147 |
|
|
|
|
|
|
|
148 |
= Version 4.1.2 =
|
149 |
* Bug fixed related to the debug mode that was not working properly
|
150 |
* Bug fixed related to custom js and css codes
|
@@ -510,4 +513,4 @@ Leave us a good review :)
|
|
510 |
|
511 |
== Upgrade Notice ==
|
512 |
|
513 |
-
Current Version of Popup Builder is 4.1.
|
8 |
Requires at least: 4.2
|
9 |
Tested up to: 5.9
|
10 |
Requires PHP: 5.3.3
|
11 |
+
Stable tag: 4.1.3
|
12 |
License: GPLv2 or later
|
13 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
14 |
|
145 |
|
146 |
== Changelog ==
|
147 |
|
148 |
+
= Version 4.1.3 =
|
149 |
+
* Improvement of shortcodes when user sends newsletters in test mode
|
150 |
+
|
151 |
= Version 4.1.2 =
|
152 |
* Bug fixed related to the debug mode that was not working properly
|
153 |
* Bug fixed related to custom js and css codes
|
513 |
|
514 |
== Upgrade Notice ==
|
515 |
|
516 |
+
Current Version of Popup Builder is 4.1.3
|