Version Description
Current Version of Popup Builder is 3.52
Download this release
Release Info
Developer | Sygnoos |
Plugin | Popup Builder – Responsive WordPress Pop up |
Version | 3.52 |
Comparing to | |
See all releases |
Code changes from version 3.51 to 3.52
- com/classes/Actions.php +5 -5
- com/classes/Ajax.php +7 -0
- com/classes/popups/SGPopup.php +13 -6
- com/helpers/AdminHelper.php +1 -1
- com/helpers/ConfigDataHelper.php +5 -2
- popup-builder.php +3 -1
- public/css/popupAdminStyles.css +0 -4
- public/css/theme.css +2 -2
- public/js/Backend.js +1 -1
- public/js/PopupBuilder.js +10 -2
- public/js/PopupConfig.js +5 -2
- public/views/customEditor.php +3 -3
- public/views/optionsView.php +1 -1
- readme.txt +15 -2
com/classes/Actions.php
CHANGED
@@ -580,7 +580,7 @@ class Actions
|
|
580 |
|
581 |
$pattern = "/\[(\[?)(Unsubscribe)(?![\w-])([^\]\/]*(?:\/(?!\])[^\]\/]*)*?)(?:(\/)\]|\](?:([^\[]\*+(?:\[(?!\/\2\])[^\[]\*+)\*+)\[\/\2\])?)(\]?)/";
|
582 |
preg_match($pattern, $emailMessage, $matches);
|
583 |
-
$title = 'Unsubscribe';
|
584 |
if ($matches) {
|
585 |
$patternUnsubscribe = $matches[0];
|
586 |
// If user didn't change anything inside the [unsubscribe] shortcode $matches[2] will be equal to 'Unsubscribe'
|
@@ -616,11 +616,11 @@ class Actions
|
|
616 |
}
|
617 |
$failedTotal = $totalSubscribers - $successTotal;
|
618 |
|
619 |
-
$emailMessageCustom = 'Your mail list
|
620 |
-
|
621 |
For more details, please download log file inside the plugin.
|
622 |
-
|
623 |
-
|
624 |
|
625 |
wp_mail($fromEmail, $subscriptionFormTitle.' list has been successfully delivered!', $emailMessageCustom, $headers);
|
626 |
delete_option('SGPB_NEWSLETTER_'.$subscriptionFormId);
|
580 |
|
581 |
$pattern = "/\[(\[?)(Unsubscribe)(?![\w-])([^\]\/]*(?:\/(?!\])[^\]\/]*)*?)(?:(\/)\]|\](?:([^\[]\*+(?:\[(?!\/\2\])[^\[]\*+)\*+)\[\/\2\])?)(\]?)/";
|
582 |
preg_match($pattern, $emailMessage, $matches);
|
583 |
+
$title = __('Unsubscribe', SG_POPUP_TEXT_DOMAIN);
|
584 |
if ($matches) {
|
585 |
$patternUnsubscribe = $matches[0];
|
586 |
// If user didn't change anything inside the [unsubscribe] shortcode $matches[2] will be equal to 'Unsubscribe'
|
616 |
}
|
617 |
$failedTotal = $totalSubscribers - $successTotal;
|
618 |
|
619 |
+
$emailMessageCustom = __('Your mail list %s delivered successfully!
|
620 |
+
%d of the %d emails succeeded, %d failed.
|
621 |
For more details, please download log file inside the plugin.
|
622 |
+
This email was generated via Popup Builder plugin.', SG_POPUP_TEXT_DOMAIN);
|
623 |
+
$emailMessageCustom = sprintf($emailMessageCustom, $subscriptionFormTitle, $successTotal, $totalSubscribers, $failedTotal);
|
624 |
|
625 |
wp_mail($fromEmail, $subscriptionFormTitle.' list has been successfully delivered!', $emailMessageCustom, $headers);
|
626 |
delete_option('SGPB_NEWSLETTER_'.$subscriptionFormId);
|
com/classes/Ajax.php
CHANGED
@@ -81,6 +81,13 @@ class Ajax
|
|
81 |
|
82 |
public function sgpbAutosave()
|
83 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
if (!isset($_POST['allPopupData'])) {
|
85 |
echo true;
|
86 |
wp_die();
|
81 |
|
82 |
public function sgpbAutosave()
|
83 |
{
|
84 |
+
$popupId = (int)$_POST['post_ID'];
|
85 |
+
$postStatus = get_post_status($popupId);
|
86 |
+
if ($postStatus == 'publish') {
|
87 |
+
echo '';
|
88 |
+
wp_die();
|
89 |
+
}
|
90 |
+
|
91 |
if (!isset($_POST['allPopupData'])) {
|
92 |
echo true;
|
93 |
wp_die();
|
com/classes/popups/SGPopup.php
CHANGED
@@ -268,9 +268,11 @@ abstract class SGPopup
|
|
268 |
$saveMode = '_preview';
|
269 |
}
|
270 |
|
271 |
-
|
272 |
-
|
273 |
-
|
|
|
|
|
274 |
$savedData = apply_filters('sgpbPopupSavedData', $savedData);
|
275 |
|
276 |
if (empty($savedData)) {
|
@@ -1509,17 +1511,22 @@ abstract class SGPopup
|
|
1509 |
continue;
|
1510 |
}
|
1511 |
|
1512 |
-
$popup = self::find($postData->ID);
|
1513 |
if (empty($popup)) {
|
1514 |
continue;
|
1515 |
}
|
|
|
|
|
|
|
|
|
|
|
1516 |
if (isset($filters['type'])) {
|
1517 |
if (is_array($filters['type'])) {
|
1518 |
-
if (!in_array($
|
1519 |
continue;
|
1520 |
}
|
1521 |
}
|
1522 |
-
else if ($
|
1523 |
continue;
|
1524 |
}
|
1525 |
}
|
268 |
$saveMode = '_preview';
|
269 |
}
|
270 |
|
271 |
+
$savedData = array();
|
272 |
+
if (file_exists(dirname(__FILE__).'/PopupData.php')) {
|
273 |
+
require_once(dirname(__FILE__).'/PopupData.php');
|
274 |
+
$savedData = PopupData::getPopupDataById($popupId, $saveMode);
|
275 |
+
}
|
276 |
$savedData = apply_filters('sgpbPopupSavedData', $savedData);
|
277 |
|
278 |
if (empty($savedData)) {
|
1511 |
continue;
|
1512 |
}
|
1513 |
|
1514 |
+
$popup = self::find($postData->ID, $args);
|
1515 |
if (empty($popup)) {
|
1516 |
continue;
|
1517 |
}
|
1518 |
+
if (!($popup instanceof SGPopup)) {
|
1519 |
+
continue;
|
1520 |
+
}
|
1521 |
+
$type = @$popup->getType();
|
1522 |
+
|
1523 |
if (isset($filters['type'])) {
|
1524 |
if (is_array($filters['type'])) {
|
1525 |
+
if (!in_array($type, $filters['type'])) {
|
1526 |
continue;
|
1527 |
}
|
1528 |
}
|
1529 |
+
else if ($type != $filters['type']) {
|
1530 |
continue;
|
1531 |
}
|
1532 |
}
|
com/helpers/AdminHelper.php
CHANGED
@@ -855,7 +855,7 @@ class AdminHelper
|
|
855 |
$imageUrl = SG_POPUP_IMG_URL.'NoImage.png';
|
856 |
}
|
857 |
}
|
858 |
-
if (is_wp_error($remoteData) && empty($remoteData->error_data)) {
|
859 |
$imageUrl = $originalImageUrl;
|
860 |
}
|
861 |
if (!$shouldNotConvertBase64) {
|
855 |
$imageUrl = SG_POPUP_IMG_URL.'NoImage.png';
|
856 |
}
|
857 |
}
|
858 |
+
else if (is_wp_error($remoteData) && empty($remoteData->error_data)) {
|
859 |
$imageUrl = $originalImageUrl;
|
860 |
}
|
861 |
if (!$shouldNotConvertBase64) {
|
com/helpers/ConfigDataHelper.php
CHANGED
@@ -159,10 +159,10 @@ class ConfigDataHelper
|
|
159 |
|
160 |
public static function getPostsAllCategories($postType = 'post', $taxonomies = array())
|
161 |
{
|
162 |
-
|
163 |
$cats = get_terms(
|
164 |
array(
|
165 |
-
'
|
|
|
166 |
'type' => $postType,
|
167 |
'orderby' => 'name',
|
168 |
'order' => 'ASC'
|
@@ -199,6 +199,9 @@ class ConfigDataHelper
|
|
199 |
if (function_exists('is_shop')) {
|
200 |
$postTypes['is_shop'] = __('Shop Page', SG_POPUP_TEXT_DOMAIN);
|
201 |
}
|
|
|
|
|
|
|
202 |
|
203 |
return $postTypes;
|
204 |
}
|
159 |
|
160 |
public static function getPostsAllCategories($postType = 'post', $taxonomies = array())
|
161 |
{
|
|
|
162 |
$cats = get_terms(
|
163 |
array(
|
164 |
+
'taxonomy' => $taxonomies,
|
165 |
+
'hide_empty' => false,
|
166 |
'type' => $postType,
|
167 |
'orderby' => 'name',
|
168 |
'order' => 'ASC'
|
199 |
if (function_exists('is_shop')) {
|
200 |
$postTypes['is_shop'] = __('Shop Page', SG_POPUP_TEXT_DOMAIN);
|
201 |
}
|
202 |
+
if (function_exists('is_archive')) {
|
203 |
+
$postTypes['is_archive'] = __('Archive Page', SG_POPUP_TEXT_DOMAIN);
|
204 |
+
}
|
205 |
|
206 |
return $postTypes;
|
207 |
}
|
popup-builder.php
CHANGED
@@ -3,10 +3,12 @@
|
|
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
|
|
|
|
|
10 |
*/
|
11 |
|
12 |
/*If this file is called directly, abort.*/
|
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.52
|
7 |
* Author: Sygnoos
|
8 |
* Author URI: https://sygnoos.com
|
9 |
* License: GPLv2
|
10 |
+
* Text Domain: popupBuilder
|
11 |
+
* Domain Path: /languages/
|
12 |
*/
|
13 |
|
14 |
/*If this file is called directly, abort.*/
|
public/css/popupAdminStyles.css
CHANGED
@@ -1909,10 +1909,6 @@ input:checked + .sgpb-slider:before {
|
|
1909 |
}
|
1910 |
/*Extensions notification end*/
|
1911 |
|
1912 |
-
#wpbody-content {
|
1913 |
-
overflow: hidden !important;
|
1914 |
-
}
|
1915 |
-
|
1916 |
/* Generated by Glyphter (http://www.glyphter.com) on Thu Jun 28 2018*/
|
1917 |
@font-face {
|
1918 |
font-family: 'popupbuilder-icon';
|
1909 |
}
|
1910 |
/*Extensions notification end*/
|
1911 |
|
|
|
|
|
|
|
|
|
1912 |
/* Generated by Glyphter (http://www.glyphter.com) on Thu Jun 28 2018*/
|
1913 |
@font-face {
|
1914 |
font-family: 'popupbuilder-icon';
|
public/css/theme.css
CHANGED
@@ -10,9 +10,9 @@ iframe{margin:0
|
|
10 |
!important;width:1px !important;min-width:100% !important;height:100% !important}.sgpb-video-iframe-wrapper{width:100%;height:100%;overflow:hidden;-webkit-overflow-scrolling:touch}.sgpb-video-iframe-wrapper
|
11 |
iframe{margin:0
|
12 |
!important;width:100%;height:100%;border:none}.sgpb-video-error-message-wrapper
|
13 |
-
h1{text-align:center}.sgpb-video-error-message-wrapper h3:last-child{padding:0}#sgpb-yes-button,#sgpb-no-button{text-transform:none !important}.sg-fb-buttons-wrapper{text-align:center;min-height:25px}@media only screen and (max-width: 600px){.sgpb-scroll-wrapper{overflow:auto !important}}@media (min-width: 600px){.sgpb-fb-wrapper-standard{min-width:450px !important;overflow:hidden}}@media (min-width: 521px) and (max-width: 599px){.sgpb-fb-wrapper-standard{min-width:450px !important;overflow:scroll}#sg-facebook-like{overflow:hidden}}@media (max-width: 520px){.sgpb-fb-wrapper-standard{min-width:380px !important;max-width:380px !important;overflow:hidden}.sgpb-fb-wrapper-standard .fb-like{max-width:380px !important}#sg-facebook-like{overflow:hidden}}@media (max-width: 420px){.sgpb-fb-wrapper-standard{min-width:350px !important;max-width:350px !important;overflow:hidden}}@media (max-width: 400px){.sgpb-fb-wrapper-standard{min-width:330px !important;max-width:330px !important;overflow:scroll}}@media (max-width: 320px){.sgpb-fb-wrapper-standard{min-width:270px !important;max-width:270px !important;overflow:scroll}}.sg-hide-element{display:none}a.sg-show-popup{cursor:pointer !important}.sgpb-cursor-pointer{cursor:pointer}/*/*/.sgpb-theme-1-content{border-radius:6px;padding-bottom:0;box-shadow:rgba(0, 0, 0, 0.6) 0px 0px 0px 14px !important;border-bottom-width:35px !important;border-bottom-color:#fff !important}.sgpb-theme-4-content{padding-bottom:0;border-radius:7px !important;border-bottom-width:35px !important;border-bottom-color:#fff !important}.sgpb-popup-close-button-4{height:auto !important}.sgpb-popup-dialog-main-div-theme-wrapper-5{border:8px
|
14 |
solid #555;outline:1px
|
15 |
-
solid #8A8A8A;background-color:#707070}.sgpb-theme-5-content{border-radius:3px !important;box-shadow:0 0 10px #222 !important}.sgpb-theme-6-content{box-shadow:#646161 0px 0px 8px 3px !important}.sgpb-popup-close-button-1:hover,.sgpb-popup-close-button-2:hover,.sgpb-popup-close-button-5:hover{opacity:0.8}.sgpb-popup-close-button-3:hover{opacity:0.9}.sgpb-popup-close-button-2{border-radius:2px}.sgpb-main-image-content-wrapper
|
16 |
img{height:auto;max-width:100%}.sgpb-overflow-hidden{overflow:hidden !important}.sgpb-popup-content-direction-right{direction:rtl !important}.sgpb-popup-content-direction-right input[type="url"],
|
17 |
.sgpb-popup-content-direction-right input[type="email"],
|
18 |
.sgpb-popup-content-direction-right .sg-fb-buttons-wrapper,
|
10 |
!important;width:1px !important;min-width:100% !important;height:100% !important}.sgpb-video-iframe-wrapper{width:100%;height:100%;overflow:hidden;-webkit-overflow-scrolling:touch}.sgpb-video-iframe-wrapper
|
11 |
iframe{margin:0
|
12 |
!important;width:100%;height:100%;border:none}.sgpb-video-error-message-wrapper
|
13 |
+
h1{text-align:center}.sgpb-video-error-message-wrapper h3:last-child{padding:0}#sgpb-yes-button,#sgpb-no-button{text-transform:none !important}.sg-fb-buttons-wrapper{text-align:center;min-height:25px}@media only screen and (max-width: 600px){.sgpb-scroll-wrapper{overflow:auto !important}}@media (min-width: 600px){.sgpb-fb-wrapper-standard{min-width:450px !important;overflow:hidden}}@media (min-width: 521px) and (max-width: 599px){.sgpb-fb-wrapper-standard{min-width:450px !important;overflow:scroll}#sg-facebook-like{overflow:hidden}}@media (max-width: 520px){.sgpb-fb-wrapper-standard{min-width:380px !important;max-width:380px !important;overflow:hidden}.sgpb-fb-wrapper-standard .fb-like{max-width:380px !important}#sg-facebook-like{overflow:hidden}}@media (max-width: 420px){.sgpb-fb-wrapper-standard{min-width:350px !important;max-width:350px !important;overflow:hidden}}@media (max-width: 400px){.sgpb-fb-wrapper-standard{min-width:330px !important;max-width:330px !important;overflow:scroll}}@media (max-width: 320px){.sgpb-fb-wrapper-standard{min-width:270px !important;max-width:270px !important;overflow:scroll}}.sg-hide-element{display:none}a.sg-show-popup{cursor:pointer !important}.sgpb-cursor-pointer{cursor:pointer}/*/*/.sgpb-theme-1-content{border-radius:6px;padding-bottom:0;box-shadow:rgba(0, 0, 0, 0.6) 0px 0px 0px 14px !important;border-bottom-width:35px !important;border-bottom-color:#fff !important}.sgpb-theme-4-content{padding-bottom:0;border-radius:7px !important;border-bottom-width:35px !important;border-bottom-color:#fff !important}.sgpb-popup-close-button-4{z-index:initial !important;height:auto !important}.sgpb-popup-dialog-main-div-theme-wrapper-5{border:8px
|
14 |
solid #555;outline:1px
|
15 |
+
solid #8A8A8A;background-color:#707070}.sgpb-theme-5-content{border-radius:3px !important;box-shadow:0 0 10px #222 !important}.sgpb-theme-6-content{box-shadow:#646161 0px 0px 8px 3px !important}.sgpb-popup-close-button-1:hover,.sgpb-popup-close-button-2:hover,.sgpb-popup-close-button-5:hover{z-index:initial !important;opacity:0.8}.sgpb-popup-close-button-3:hover{z-index:initial !important;opacity:0.9}.sgpb-popup-close-button-2{z-index:initial !important;border-radius:2px}.sgpb-main-image-content-wrapper
|
16 |
img{height:auto;max-width:100%}.sgpb-overflow-hidden{overflow:hidden !important}.sgpb-popup-content-direction-right{direction:rtl !important}.sgpb-popup-content-direction-right input[type="url"],
|
17 |
.sgpb-popup-content-direction-right input[type="email"],
|
18 |
.sgpb-popup-content-direction-right .sg-fb-buttons-wrapper,
|
public/js/Backend.js
CHANGED
@@ -1580,7 +1580,6 @@ SGPBBackend.prototype.previewInit = function()
|
|
1580 |
SGPBBackend.prototype.autosave();
|
1581 |
/* when preview button clicked, set input value to 1 */
|
1582 |
jQuery('#sgpb-is-preview').val('1');
|
1583 |
-
var popupId = jQuery('#post_ID').val();
|
1584 |
});
|
1585 |
jQuery('#title').on('change', function() {
|
1586 |
SGPBBackend.prototype.autosave();
|
@@ -1796,6 +1795,7 @@ SGPBBackend.prototype.autosave = function()
|
|
1796 |
if (!jQuery('#titlediv').length) {
|
1797 |
return false;
|
1798 |
}
|
|
|
1799 |
var allPopupData = jQuery('form#post').serializeArray();
|
1800 |
var data = {
|
1801 |
nonce: SGPB_JS_PARAMS.nonce,
|
1580 |
SGPBBackend.prototype.autosave();
|
1581 |
/* when preview button clicked, set input value to 1 */
|
1582 |
jQuery('#sgpb-is-preview').val('1');
|
|
|
1583 |
});
|
1584 |
jQuery('#title').on('change', function() {
|
1585 |
SGPBBackend.prototype.autosave();
|
1795 |
if (!jQuery('#titlediv').length) {
|
1796 |
return false;
|
1797 |
}
|
1798 |
+
|
1799 |
var allPopupData = jQuery('form#post').serializeArray();
|
1800 |
var data = {
|
1801 |
nonce: SGPB_JS_PARAMS.nonce,
|
public/js/PopupBuilder.js
CHANGED
@@ -121,8 +121,16 @@ SGPBPopup.listeners = function () {
|
|
121 |
var event = new Event('resize');
|
122 |
}
|
123 |
else {
|
124 |
-
|
125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
}
|
127 |
window.dispatchEvent(event);
|
128 |
|
121 |
var event = new Event('resize');
|
122 |
}
|
123 |
else {
|
124 |
+
if (SGPBPopup.isIE()) {
|
125 |
+
var event = document.createEvent('Event');
|
126 |
+
event.initEvent('resize', true, true);
|
127 |
+
}
|
128 |
+
else {
|
129 |
+
var event = new CustomEvent('resize', {
|
130 |
+
bubbles: true,
|
131 |
+
cancelable: true
|
132 |
+
});
|
133 |
+
}
|
134 |
}
|
135 |
window.dispatchEvent(event);
|
136 |
|
public/js/PopupConfig.js
CHANGED
@@ -4,8 +4,11 @@ String.prototype.firstToLowerCase=function()
|
|
4 |
{return this.charAt(0).toLowerCase()+this.slice(1);};String.prototype.firstToUpperCase=function()
|
5 |
{return this.charAt(0).toUpperCase()+this.slice(1);};PopupConfig.prototype.magicCall=function(functionName,arrgname)
|
6 |
{if(functionName.indexOf('get')!=-1){var param=functionName.replace(/^get/g,"").firstToLowerCase();return this[param];}
|
7 |
-
else{var param=functionName.replace(/^set/g,"").firstToLowerCase();this[param]=arrgname;}};PopupConfig.prototype.
|
8 |
-
{var
|
|
|
|
|
|
|
9 |
{var that=this;var eventSendArgs={'popupId':that.popupId,'popupData':that.popupData,'currentObj':that.currentObj};window.sgWindowOldWidth=window.innerWidth;window.sgWindowOldHeight=window.innerHeight;var config={popupId:that.popupId,openDelay:this.openDelay,popupTheme:this.popupTheme,popupType:this.popupType,closeBehavior:{allowed:this.allowed,showButton:this.showButton,buttonPosition:this.buttonPosition,buttonInside:this.buttonInside,autoclose:this.autoclose,overlayShouldClose:this.overlayShouldClose,contentShouldClose:this.contentShouldClose,escShouldClose:this.escShouldClose,right:this.closeButtonPositionRight,top:this.closeButtonPositionTop,bottom:this.closeButtonPositionBottom,left:this.closeButtonPositionLeft},openAnimation:{type:this.openAnimationEffect,speed:this.openAnimationSpeed,status:this.openAnimationStatus},closeAnimation:{type:this.closeAnimationEffect,speed:this.closeAnimationSpeed,status:this.closeAnimationStatus},closeButton:{data:this.buttonImage,width:this.closeButtonWidth,height:this.closeButtonHeight,widthType:this.closeButtonWidthType,heightType:this.closeButtonHeightType,type:this.closeButtonType,text:this.closeButtonText},overlay:{visible:this.overlayVisible,color:this.overlayColor,opacity:this.overlayOpacity,addClass:this.overlayAddClass},contentBox:{padding:this.contentPadding,zIndex:this.zIndex,showBackground:this.contentShowBackground,backgroundColor:this.contentBackgroundColor,backgroundImage:this.contentBackgroundImage,backgroundMode:this.contentBackgroundMode,backgroundPosition:this.contentBackgroundPosition,borderStyle:this.contentBorderStyle,borderRadius:this.contentBorderRadius,borderRadiusType:this.contentBorderRadiusType,borderColor:this.contentBorderColor,borderWidth:this.contentBorderWidth,boxBorderWidth:this.boxBorderWidth,shadowColor:this.contentShadowColor,shadowBlur:this.contentShadowBlur,scrollingEnabled:this.scrollingEnabled,shadowSpread:this.shadowSpread,addClass:this.contentAddClass},contents:this.contents,inline:this.srcElement,iframe:false,position:{right:this.positionRight,top:this.positionTop,bottom:this.positionBottom,left:this.positionLeft},sizingRanges:[{screenFrom:{width:0,height:0},screenTo:{width:300,height:3000},width:'100%',height:this.height,maxWidth:this.maxWidth,maxHeight:this.maxHeight,minWidth:this.minWidth,minHeight:this.minHeight},{screenFrom:{width:300,height:0},screenTo:{width:3000,height:3000},width:this.width,height:this.height,maxWidth:this.maxWidth,maxHeight:this.maxHeight,minWidth:this.minWidth,minHeight:this.minHeight}],shouldOpen:function(){return true;},willOpen:function(){that.addCustomEvent('sgpbWillOpen',eventSendArgs);},didOpen:function(args){var finalArgs=Object.assign(args,eventSendArgs);that.addCustomEvent('sgpbDidOpen',finalArgs);},shouldClose:function(){return true;},willClose:function(){that.addCustomEvent('sgpbWillClose',eventSendArgs);},didClose:function(){that.addCustomEvent('sgpbDidClose',eventSendArgs);}};if(this.customShouldOpen){config.shouldOpen=this.customShouldOpen;}
|
10 |
if(this.customShouldClose){config.shouldClose=this.customShouldClose;}
|
11 |
return config;};var obj=new PopupConfig();
|
4 |
{return this.charAt(0).toLowerCase()+this.slice(1);};String.prototype.firstToUpperCase=function()
|
5 |
{return this.charAt(0).toUpperCase()+this.slice(1);};PopupConfig.prototype.magicCall=function(functionName,arrgname)
|
6 |
{if(functionName.indexOf('get')!=-1){var param=functionName.replace(/^get/g,"").firstToLowerCase();return this[param];}
|
7 |
+
else{var param=functionName.replace(/^set/g,"").firstToLowerCase();this[param]=arrgname;}};PopupConfig.prototype.isIE=function()
|
8 |
+
{var ua=navigator.userAgent;var isIE=ua.indexOf('MSIE ')>-1||ua.indexOf('Trident/')>-1;return isIE;};PopupConfig.prototype.addCustomEvent=function(eventName,args)
|
9 |
+
{if(this.isIE()){var event=document.createEvent('CustomEvent');event.initCustomEvent(eventName,true,true,args);}
|
10 |
+
else{var event=new CustomEvent(eventName,{detail:args,bubbles:true,cancelable:true});}
|
11 |
+
window.dispatchEvent(event);};PopupConfig.prototype.combineConfigObj=function()
|
12 |
{var that=this;var eventSendArgs={'popupId':that.popupId,'popupData':that.popupData,'currentObj':that.currentObj};window.sgWindowOldWidth=window.innerWidth;window.sgWindowOldHeight=window.innerHeight;var config={popupId:that.popupId,openDelay:this.openDelay,popupTheme:this.popupTheme,popupType:this.popupType,closeBehavior:{allowed:this.allowed,showButton:this.showButton,buttonPosition:this.buttonPosition,buttonInside:this.buttonInside,autoclose:this.autoclose,overlayShouldClose:this.overlayShouldClose,contentShouldClose:this.contentShouldClose,escShouldClose:this.escShouldClose,right:this.closeButtonPositionRight,top:this.closeButtonPositionTop,bottom:this.closeButtonPositionBottom,left:this.closeButtonPositionLeft},openAnimation:{type:this.openAnimationEffect,speed:this.openAnimationSpeed,status:this.openAnimationStatus},closeAnimation:{type:this.closeAnimationEffect,speed:this.closeAnimationSpeed,status:this.closeAnimationStatus},closeButton:{data:this.buttonImage,width:this.closeButtonWidth,height:this.closeButtonHeight,widthType:this.closeButtonWidthType,heightType:this.closeButtonHeightType,type:this.closeButtonType,text:this.closeButtonText},overlay:{visible:this.overlayVisible,color:this.overlayColor,opacity:this.overlayOpacity,addClass:this.overlayAddClass},contentBox:{padding:this.contentPadding,zIndex:this.zIndex,showBackground:this.contentShowBackground,backgroundColor:this.contentBackgroundColor,backgroundImage:this.contentBackgroundImage,backgroundMode:this.contentBackgroundMode,backgroundPosition:this.contentBackgroundPosition,borderStyle:this.contentBorderStyle,borderRadius:this.contentBorderRadius,borderRadiusType:this.contentBorderRadiusType,borderColor:this.contentBorderColor,borderWidth:this.contentBorderWidth,boxBorderWidth:this.boxBorderWidth,shadowColor:this.contentShadowColor,shadowBlur:this.contentShadowBlur,scrollingEnabled:this.scrollingEnabled,shadowSpread:this.shadowSpread,addClass:this.contentAddClass},contents:this.contents,inline:this.srcElement,iframe:false,position:{right:this.positionRight,top:this.positionTop,bottom:this.positionBottom,left:this.positionLeft},sizingRanges:[{screenFrom:{width:0,height:0},screenTo:{width:300,height:3000},width:'100%',height:this.height,maxWidth:this.maxWidth,maxHeight:this.maxHeight,minWidth:this.minWidth,minHeight:this.minHeight},{screenFrom:{width:300,height:0},screenTo:{width:3000,height:3000},width:this.width,height:this.height,maxWidth:this.maxWidth,maxHeight:this.maxHeight,minWidth:this.minWidth,minHeight:this.minHeight}],shouldOpen:function(){return true;},willOpen:function(){that.addCustomEvent('sgpbWillOpen',eventSendArgs);},didOpen:function(args){var finalArgs=Object.assign(args,eventSendArgs);that.addCustomEvent('sgpbDidOpen',finalArgs);},shouldClose:function(){return true;},willClose:function(){that.addCustomEvent('sgpbWillClose',eventSendArgs);},didClose:function(){that.addCustomEvent('sgpbDidClose',eventSendArgs);}};if(this.customShouldOpen){config.shouldOpen=this.customShouldOpen;}
|
13 |
if(this.customShouldClose){config.shouldClose=this.customShouldClose;}
|
14 |
return config;};var obj=new PopupConfig();
|
public/views/customEditor.php
CHANGED
@@ -9,12 +9,12 @@ $cssDefaultData = $defaultData['customEditorContent']['css'];
|
|
9 |
|
10 |
$savedData = get_post_meta($popupId , 'sg_popup_scripts', true);
|
11 |
$editorStaticText = array(
|
12 |
-
'If you need the popup id number in the custom code, you may use the following variable to get the ID: <code>popupId</code>'
|
13 |
);
|
14 |
?>
|
15 |
|
16 |
-
<p
|
17 |
-
<p
|
18 |
|
19 |
<div class="sgpb-wrapper">
|
20 |
<!-- editor buttons -->
|
9 |
|
10 |
$savedData = get_post_meta($popupId , 'sg_popup_scripts', true);
|
11 |
$editorStaticText = array(
|
12 |
+
__('If you need the popup id number in the custom code, you may use the following variable to get the ID: <code>popupId</code>', SG_POPUP_TEXT_DOMAIN)
|
13 |
);
|
14 |
?>
|
15 |
|
16 |
+
<p><?php _e('This section is for adding custom codes (CSS or JS) for the popup, it requires some coding knowledge', SG_POPUP_TEXT_DOMAIN);?></p>.
|
17 |
+
<p><?php _e('You may use your custom codes for extra actions connected to the popup opening (before, after, etc.) in the fields below', SG_POPUP_TEXT_DOMAIN);?></p>.
|
18 |
|
19 |
<div class="sgpb-wrapper">
|
20 |
<!-- editor buttons -->
|
public/views/optionsView.php
CHANGED
@@ -277,7 +277,7 @@ if (!empty($removedOptions['content-copy-to-clipboard'])) {
|
|
277 |
</div>
|
278 |
<?php if (empty($removedOptions['sgpb-disable-page-scrolling'])): ?>
|
279 |
<div class="row form-group">
|
280 |
-
<label class="col-md-5 sgpb-static-padding-top" for="disable-page-scrolling"
|
281 |
<?php _e('Disable page scrolling', SG_POPUP_TEXT_DOMAIN); ?>:
|
282 |
</label>
|
283 |
<div class="col-md-6">
|
277 |
</div>
|
278 |
<?php if (empty($removedOptions['sgpb-disable-page-scrolling'])): ?>
|
279 |
<div class="row form-group">
|
280 |
+
<label class="col-md-5 sgpb-static-padding-top" for="disable-page-scrolling">
|
281 |
<?php _e('Disable page scrolling', SG_POPUP_TEXT_DOMAIN); ?>:
|
282 |
</label>
|
283 |
<div class="col-md-6">
|
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,19 @@ Go to the Popup Builder settings and set your desired options.
|
|
185 |
|
186 |
== Changelog ==
|
187 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
= Version 3.51 =
|
189 |
* Bug fixed related to Newsletter.
|
190 |
* Added new parameter PopupID inside sgpbPopupContentLoadToPage filter.
|
@@ -1068,7 +1081,7 @@ Leave us a good review :)
|
|
1068 |
|
1069 |
== Upgrade Notice ==
|
1070 |
|
1071 |
-
Current Version of Popup Builder is 3.
|
1072 |
|
1073 |
== Other Notes ==
|
1074 |
|
9 |
Requires at least: 3.8
|
10 |
Tested up to: 5.3
|
11 |
Requires PHP: 5.3.3
|
12 |
+
Stable tag: 3.52
|
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.52 =
|
189 |
+
* Popup notifications section improvements.
|
190 |
+
* Translation .pot file updated.
|
191 |
+
* Missing styles for the Close button fixed.
|
192 |
+
* Fixed compatibility issues with Beaver Builder (page builder) plugin.
|
193 |
+
* Speed improvements, related to getting popup data from a database.
|
194 |
+
* JS code improvements related to popup opening, there were issues with old/new browsers.
|
195 |
+
* Image popup improvements, when there is an incorrect image used: with incorrect URL, in this case, we will show the default “no image” placeholder.
|
196 |
+
* Deprecated functions updated (JS).
|
197 |
+
* Unneeded CSS code removed, which affected on the admin panel of the plugin.
|
198 |
+
* New “Archive” page added in Display Rules => Page types.
|
199 |
+
* JS error fixed, which affected on correct work of extra events.
|
200 |
+
|
201 |
= Version 3.51 =
|
202 |
* Bug fixed related to Newsletter.
|
203 |
* Added new parameter PopupID inside sgpbPopupContentLoadToPage filter.
|
1081 |
|
1082 |
== Upgrade Notice ==
|
1083 |
|
1084 |
+
Current Version of Popup Builder is 3.52
|
1085 |
|
1086 |
== Other Notes ==
|
1087 |
|