Popup Builder – Responsive WordPress Pop up - Version 2.6.7.6

Version Description

Current Version of Popup Builder is 2.6.7

Download this release

Release Info

Developer Sygnoos
Plugin Icon 128x128 Popup Builder – Responsive WordPress Pop up
Version 2.6.7.6
Comparing to
See all releases

Code changes from version 2.6.7.5 to 2.6.7.6

config.php CHANGED
@@ -24,7 +24,7 @@ if(!class_exists('SgPopupBuilderConfig')) {
24
  define('SG_APP_POPUP_JS', SG_APP_POPUP_PATH . '/javascript');
25
  define('SG_APP_POPUP_HELPERS', SG_APP_POPUP_PATH . '/helpers/');
26
  define('SG_APP_POPUP_TABLE_LIMIT', 15);
27
- define('SG_POPUP_VERSION', 2.675);
28
  define('SG_POPUP_PRO_VERSION', 3.38);
29
  define('SG_POPUP_PRO_URL', 'https://popup-builder.com/');
30
  define('SG_POPUP_EXTENSION_URL', 'https://popup-builder.com/extensions');
24
  define('SG_APP_POPUP_JS', SG_APP_POPUP_PATH . '/javascript');
25
  define('SG_APP_POPUP_HELPERS', SG_APP_POPUP_PATH . '/helpers/');
26
  define('SG_APP_POPUP_TABLE_LIMIT', 15);
27
+ define('SG_POPUP_VERSION', 2.676);
28
  define('SG_POPUP_PRO_VERSION', 3.38);
29
  define('SG_POPUP_PRO_URL', 'https://popup-builder.com/');
30
  define('SG_POPUP_EXTENSION_URL', 'https://popup-builder.com/extensions');
files/sg_functions.php CHANGED
@@ -591,7 +591,7 @@ class SGFunctions
591
  return true;
592
  }
593
  $usersSelectedRoles = (array)$usersSelectedRoles;
594
- if ((isset($usersSelectedRoles) && !in_array($currentUserRole, $usersSelectedRoles))) {
595
  return false;
596
  }
597
 
591
  return true;
592
  }
593
  $usersSelectedRoles = (array)$usersSelectedRoles;
594
+ if ((!empty($usersSelectedRoles) && !in_array($currentUserRole, $usersSelectedRoles))) {
595
  return false;
596
  }
597
 
javascript/sg_popup_frontend.js CHANGED
@@ -424,6 +424,12 @@ SGPopup.prototype.canOpenPopup = function (id, openOnce, isOnLoad) {
424
  return this.canOpenOnce(id);
425
  }
426
 
 
 
 
 
 
 
427
  return true;
428
  };
429
 
424
  return this.canOpenOnce(id);
425
  }
426
 
427
+ var dontShow = SGPopup.getCookie('sgPopupDontShow' + id);
428
+
429
+ if (dontShow) {
430
+ return false;
431
+ }
432
+
433
  return true;
434
  };
435
 
javascript/sg_popup_init.js CHANGED
@@ -1,5 +1,8 @@
1
- function SgPopupInit(popupData){this.popupData=popupData;this.shortcodeInPopupContent();this.reopenPopupAfterSubmission();}
2
- SgPopupInit.prototype.reopenPopupAfterSubmission=function(){var that=this;var reopenSubmission=this.popupData['reopenAfterSubmission'];var currentPopupId=this.popupData['id'];SGPopup.deleteCookie('sgSubmitReloadingForm');if(reopenSubmission){jQuery("#sgcboxLoadedContent form").submit(function(){SGPopup.setCookie('sgSubmitReloadingForm',currentPopupId);});}};SgPopupInit.prototype.shortcodeInPopupContent=function(){jQuery(".sg-show-popup").bind('click',function(){var sgPopupID=jQuery(this).attr("data-sgpopupid");var sgInsidePopup=jQuery(this).attr("insidepopup");if(typeof sgInsidePopup=='undefined'||sgInsidePopup!='on'){return false;}
 
 
 
3
  jQuery.sgcolorbox.close();jQuery('#sgcolorbox').bind("sgPopupClose",function(){if(sgPopupID==''){return;}
4
  var sgPoupFrontendObj=new SGPopup();sgPoupFrontendObj.showPopup(sgPopupID,false);sgPopupID='';});});};SgPopupInit.prototype.overallInit=function(){jQuery('.sg-popup-close').bind('click',function(){jQuery.sgcolorbox.close();});if(jQuery('#sg-facebook-like').length&&typeof FB!=='undefined'){FB.XFBML.parse();}};SgPopupInit.prototype.initByPopupType=function(){var data=this.popupData;var popupObj={};var popupType=data['type'];var popupId=data['id'];switch(popupType){case'countdown':var popupObj=new SGCountdown();popupObj.init();break;case'contactForm':popupObj=new SgContactForm(popupId);popupObj.buildStyle();break;case'social':popupObj=new SgSocialFront();popupObj.init();break;case'subscription':popupObj=new SgSubscription();popupObj.init();break;case'ageRestriction':popupObj=new SGAgeRestriction();popupObj.setPopupId(popupId);popupObj.init();break;}
5
  return popupObj;};
1
+ function SgPopupInit(popupData){this.popupData=popupData;this.shortcodeInPopupContent();this.reopenPopupAfterSubmission();this.dontShowClick();}
2
+ SgPopupInit.prototype.reopenPopupAfterSubmission=function(){var that=this;var reopenSubmission=this.popupData['reopenAfterSubmission'];var currentPopupId=this.popupData['id'];SGPopup.deleteCookie('sgSubmitReloadingForm');if(reopenSubmission){jQuery("#sgcboxLoadedContent form").submit(function(){SGPopup.setCookie('sgSubmitReloadingForm',currentPopupId);});}};SgPopupInit.prototype.dontShowClick=function()
3
+ {var dontShowPopup=jQuery('#sgcboxLoadedContent [class^=sg-dont-show-popup]');if(!dontShowPopup.length){return false;}
4
+ var popupData=this.popupData;dontShowPopup.each(function(){jQuery(this).bind('click',function(e){e.preventDefault();var expireTime=365;var classNameSearch=jQuery(this).attr('class').match(/^sg-dont-show-popup/);var className=classNameSearch['input'];var numberMatched=className.match(/^sg-dont-show-popup-(\d+$)/);if(numberMatched){expireTime=parseInt(numberMatched[1]);}
5
+ var popupId=parseInt(popupData['id']);SGPopup.setCookie('sgPopupDontShow'+popupId,expireTime,expireTime,true);jQuery.sgcolorbox.close();});});};SgPopupInit.prototype.shortcodeInPopupContent=function(){jQuery(".sg-show-popup").bind('click',function(){var sgPopupID=jQuery(this).attr("data-sgpopupid");var sgInsidePopup=jQuery(this).attr("insidepopup");if(typeof sgInsidePopup=='undefined'||sgInsidePopup!='on'){return false;}
6
  jQuery.sgcolorbox.close();jQuery('#sgcolorbox').bind("sgPopupClose",function(){if(sgPopupID==''){return;}
7
  var sgPoupFrontendObj=new SGPopup();sgPoupFrontendObj.showPopup(sgPopupID,false);sgPopupID='';});});};SgPopupInit.prototype.overallInit=function(){jQuery('.sg-popup-close').bind('click',function(){jQuery.sgcolorbox.close();});if(jQuery('#sg-facebook-like').length&&typeof FB!=='undefined'){FB.XFBML.parse();}};SgPopupInit.prototype.initByPopupType=function(){var data=this.popupData;var popupObj={};var popupType=data['type'];var popupId=data['id'];switch(popupType){case'countdown':var popupObj=new SGCountdown();popupObj.init();break;case'contactForm':popupObj=new SgContactForm(popupId);popupObj.buildStyle();break;case'social':popupObj=new SgSocialFront();popupObj.init();break;case'subscription':popupObj=new SgSubscription();popupObj.init();break;case'ageRestriction':popupObj=new SGAgeRestriction();popupObj.setPopupId(popupId);popupObj.init();break;}
8
  return popupObj;};
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: 2.6.7.5
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: 2.6.7.6
7
  * Author: Sygnoos
8
  * Author URI: https://sygnoos.com
9
  * License: GPLv2
readme.txt CHANGED
@@ -170,6 +170,11 @@ Go to the Popup Builder settings and set your desired options.
170
 
171
  == Changelog ==
172
 
 
 
 
 
 
173
  = Version 2.6.7.5 =
174
  * Improvements connected to popup preview.
175
  * Bug fixes connected to user roles who can use the plugin
170
 
171
  == Changelog ==
172
 
173
+ = Version 2.6.7.6 =
174
+ * Added new class to don't show popup for a certain period of time if the user clicks on the containg button.
175
+ Example `<button class="sg-dont-show-popup-30">Close Popup and Dont Show for 30 days</button>`
176
+ * Bug fixed connected to user roles who can use the plugin
177
+
178
  = Version 2.6.7.5 =
179
  * Improvements connected to popup preview.
180
  * Bug fixes connected to user roles who can use the plugin