Popup Builder – Responsive WordPress Pop up - Version 2.6.2

Version Description

Current Version of Popup Builder is 2.5.9.3

Download this release

Release Info

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

Code changes from version 2.6.1 to 2.6.2

classes/SGPopup.php CHANGED
@@ -351,7 +351,7 @@ abstract class SGPopup {
351
  $ip = SGFunctions::getUserIpAdress();
352
 
353
  $counrty = SGFunctions::getCountryName($ip);
354
-
355
  if($allowCountries == 'allow') {
356
  $isInArray = in_array($counrty, $countryIsoArray);
357
  }
@@ -371,7 +371,7 @@ abstract class SGPopup {
371
  $insertQuery = "INSERT INTO ". $wpdb->prefix ."sg_popup_in_pages(popupId, pageId, type) VALUES ";
372
 
373
  foreach ($selectedData as $value) {
374
- $insertPreapre[] .= $wpdb->prepare( "(%d,%d,%s)", $id, $value, $type);
375
  }
376
  $insertQuery .= implode( ",\n", $insertPreapre );
377
  $wpdb->query($insertQuery);
@@ -427,7 +427,7 @@ abstract class SGPopup {
427
  public static function findInAllSelectedPages($pageId, $type) {
428
  global $wpdb;
429
 
430
- $st = $wpdb->prepare("SELECT * FROM ". $wpdb->prefix ."sg_popup_in_pages WHERE pageId = %d and type=%s", $pageId, $type);
431
  $arr = $wpdb->get_results($st, ARRAY_A);
432
  if(!$arr) return false;
433
  return $arr;
351
  $ip = SGFunctions::getUserIpAdress();
352
 
353
  $counrty = SGFunctions::getCountryName($ip);
354
+
355
  if($allowCountries == 'allow') {
356
  $isInArray = in_array($counrty, $countryIsoArray);
357
  }
371
  $insertQuery = "INSERT INTO ". $wpdb->prefix ."sg_popup_in_pages(popupId, pageId, type) VALUES ";
372
 
373
  foreach ($selectedData as $value) {
374
+ $insertPreapre[] .= $wpdb->prepare( "(%d,%s,%s)", $id, $value, $type);
375
  }
376
  $insertQuery .= implode( ",\n", $insertPreapre );
377
  $wpdb->query($insertQuery);
427
  public static function findInAllSelectedPages($pageId, $type) {
428
  global $wpdb;
429
 
430
+ $st = $wpdb->prepare("SELECT * FROM ". $wpdb->prefix ."sg_popup_in_pages WHERE pageId = %s and type=%s", $pageId, $type);
431
  $arr = $wpdb->get_results($st, ARRAY_A);
432
  if(!$arr) return false;
433
  return $arr;
config.php CHANGED
@@ -24,15 +24,15 @@ 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.61);
28
- define('SG_POPUP_PRO_VERSION', 3.33);
29
- define('SG_POPUP_PRO_URL', 'http://popup-builder.com/');
30
- define('SG_POPUP_EXTENSION_URL', 'http://popup-builder.com/extensions');
31
- define('SG_MAILCHIMP_EXTENSION_URL', 'http://popup-builder.com/downloads/mailchimp/');
32
- define('SG_ANALYTICS_EXTENSION_URL', 'http://popup-builder.com/downloads/analytics/');
33
- define('SG_AWEBER_EXTENSION_URL', 'http://popup-builder.com/downloads/aweber/');
34
- define('SG_EXITINTENT_EXTENSION_URL', 'http://popup-builder.com/downloads/exit-intent/');
35
- define('SG_ADBLOCK_EXTENSION_URL', 'http://popup-builder.com/downloads/adblock/');
36
  define('SG_IP_TO_COUNTRY_SERVICE_TIMEOUT', 2);
37
  define("SG_SHOW_POPUP_REVIEW", get_option("SG_COLOSE_REVIEW_BLOCK"));
38
  define("SG_POSTS_PER_PAGE", 1000);
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.62);
28
+ define('SG_POPUP_PRO_VERSION', 3.34);
29
+ define('SG_POPUP_PRO_URL', 'https://popup-builder.com/');
30
+ define('SG_POPUP_EXTENSION_URL', 'https://popup-builder.com/extensions');
31
+ define('SG_MAILCHIMP_EXTENSION_URL', 'https://popup-builder.com/downloads/mailchimp/');
32
+ define('SG_ANALYTICS_EXTENSION_URL', 'https://popup-builder.com/downloads/analytics/');
33
+ define('SG_AWEBER_EXTENSION_URL', 'https://popup-builder.com/downloads/aweber/');
34
+ define('SG_EXITINTENT_EXTENSION_URL', 'https://popup-builder.com/downloads/exit-intent/');
35
+ define('SG_ADBLOCK_EXTENSION_URL', 'https://popup-builder.com/downloads/adblock/');
36
  define('SG_IP_TO_COUNTRY_SERVICE_TIMEOUT', 2);
37
  define("SG_SHOW_POPUP_REVIEW", get_option("SG_COLOSE_REVIEW_BLOCK"));
38
  define("SG_POSTS_PER_PAGE", 1000);
files/options_section/pro.php CHANGED
@@ -123,6 +123,9 @@
123
  <span class="liquid-width">Disable popup overlay:</span><input class="input-width-static" type="checkbox" name="disablePopupOverlay" <?php echo $sgDisablePopupOverlay;?>>
124
  <span class="dashicons dashicons-info same-image-style"></span><span class="infoDisablePopup samefontStyle">Disable popup overlay.</span><br>
125
 
 
 
 
126
  <span class="liquid-width">Auto close popup:</span><input id="js-auto-close" class="input-width-static js-checkbox-acordion" type="checkbox" name="autoClosePopup" <?php echo $sgAutoClosePopup;?>>
127
  <span class="dashicons dashicons-info same-image-style"></span><span class="infoAutoClose samefontStyle">Close popup automatically.</span><br>
128
  <div class="js-auto-close-content acordion-main-div-content">
123
  <span class="liquid-width">Disable popup overlay:</span><input class="input-width-static" type="checkbox" name="disablePopupOverlay" <?php echo $sgDisablePopupOverlay;?>>
124
  <span class="dashicons dashicons-info same-image-style"></span><span class="infoDisablePopup samefontStyle">Disable popup overlay.</span><br>
125
 
126
+ <span class="liquid-width">Add to random popup list:</span><input class="input-width-static" type="checkbox" name="randomPopup" <?php echo $sgRandomPopup;?>>
127
+ <span class="dashicons dashicons-info same-image-style"></span><span class="infoDisablePopup samefontStyle">If this option is enabled and you have multiple popups on the same page one of the random popups will be opened..</span><br>
128
+
129
  <span class="liquid-width">Auto close popup:</span><input id="js-auto-close" class="input-width-static js-checkbox-acordion" type="checkbox" name="autoClosePopup" <?php echo $sgAutoClosePopup;?>>
130
  <span class="dashicons dashicons-info same-image-style"></span><span class="infoAutoClose samefontStyle">Close popup automatically.</span><br>
131
  <div class="js-auto-close-content acordion-main-div-content">
files/sg_popup_create_new.php CHANGED
@@ -139,12 +139,15 @@ if (isset($_GET['id'])) {
139
  $sgAllCustomPostsStatus = @$jsonData['allCustomPostsStatus'];
140
  $sgPostsAllCategories = @$jsonData['posts-all-categories'];
141
  $sgRepeatPopup = @$jsonData['repeatPopup'];
 
142
  $sgPopupAppearNumberLimit = @$jsonData['popup-appear-number-limit'];
 
143
  $sgPopupCookiePageLevel = @$jsonData['save-cookie-page-level'];
144
  $sgDisablePopup = @$jsonData['disablePopup'];
145
  $sgDisablePopupOverlay = @$jsonData['disablePopupOverlay'];
146
  $sgPopupClosingTimer = @$jsonData['popupClosingTimer'];
147
  $sgAutoClosePopup = @$jsonData['autoClosePopup'];
 
148
  $sgCountryStatus = @$jsonData['countryStatus'];
149
  $sgAllSelectedPages = @$jsonData['allSelectedPages'];
150
  $sgAllSelectedCustomPosts = @$jsonData['allSelectedCustomPosts'];
@@ -301,6 +304,7 @@ $sgPopup = array(
301
  'overlayClose' => true,
302
  'reopenAfterSubmission' => false,
303
  'contentClick'=>false,
 
304
  'fixed' => false,
305
  'top' => false,
306
  'right' => false,
@@ -328,6 +332,7 @@ $popupProDefaultValues = array(
328
  'disablePopupOverlay' => false,
329
  'redirect-to-new-tab' => true,
330
  'autoClosePopup' => false,
 
331
  'fbStatus' => true,
332
  'twitterStatus' => true,
333
  'emailStatus' => true,
@@ -346,6 +351,7 @@ $popupProDefaultValues = array(
346
  'allCustomPostsStatus' => false,
347
  'onceExpiresTime' => 7,
348
  'popup-appear-number-limit' => 1,
 
349
  'save-cookie-page-level' => false,
350
  'overlay-custom-classs' => 'sg-popup-overlay',
351
  'content-custom-classs' => 'sg-popup-content',
@@ -421,6 +427,7 @@ $reposition = sgBoolToChecked($sgPopup['reposition']);
421
  $overlayClose = sgBoolToChecked($sgPopup['overlayClose']);
422
  $reopenAfterSubmission = sgBoolToChecked($sgPopup['reopenAfterSubmission']);
423
  $contentClick = sgBoolToChecked($sgPopup['contentClick']);
 
424
  $contentClickBehavior = $sgPopup['content-click-behavior'];
425
  $theme3BorderRadius = $sgPopup['sgTheme3BorderRadius'];
426
  $popupZIndex = $sgPopup['popup-z-index'];
@@ -438,6 +445,7 @@ $repetPopup = sgBoolToChecked($popupProDefaultValues['repetPopup']);
438
  $disablePopup = sgBoolToChecked($popupProDefaultValues['disablePopup']);
439
  $disablePopupOverlay = sgBoolToChecked($popupProDefaultValues['disablePopupOverlay']);
440
  $autoClosePopup = sgBoolToChecked($popupProDefaultValues['autoClosePopup']);
 
441
  $fbStatus = sgBoolToChecked($popupProDefaultValues['fbStatus']);
442
  $twitterStatus = sgBoolToChecked($popupProDefaultValues['twitterStatus']);
443
  $emailStatus = sgBoolToChecked($popupProDefaultValues['emailStatus']);
@@ -463,6 +471,7 @@ $contactSubjectRequired = sgBoolToChecked($popupProDefaultValues['contact-subjec
463
  $saveCookiePageLevel = sgBoolToChecked($popupProDefaultValues['save-cookie-page-level']);
464
  $onceExpiresTime = $popupProDefaultValues['onceExpiresTime'];
465
  $popupAppearNumberLimit = $popupProDefaultValues['popup-appear-number-limit'];
 
466
  $countryStatus = sgBoolToChecked($popupProDefaultValues['countryStatus']);
467
  $allowCountries = $popupProDefaultValues['allowCountries'];
468
  $logedUser = $popupProDefaultValues['loggedin-user'];
@@ -571,9 +580,11 @@ $sgUserSeperate = @sgSetChecked($sgUserSeperate, $userSeperate);
571
  $sgPopupTimerStatus = @sgSetChecked($sgPopupTimerStatus, $popupTimerStatus);
572
  $sgPopupScheduleStatus = @sgSetChecked($sgPopupScheduleStatus, $popupScheduleStatus);
573
  $sgRepeatPopup = @sgSetChecked($sgRepeatPopup, $repetPopup);
 
574
  $sgDisablePopup = @sgSetChecked($sgDisablePopup, $disablePopup);
575
  $sgDisablePopupOverlay = @sgSetChecked($sgDisablePopupOverlay, $disablePopupOverlay);
576
  $sgAutoClosePopup = @sgSetChecked($sgAutoClosePopup, $autoClosePopup);
 
577
  $sgFbStatus = @sgSetChecked($sgFbStatus, $fbStatus);
578
  $sgTwitterStatus = @sgSetChecked($sgTwitterStatus, $twitterStatus);
579
  $sgEmailStatus = @sgSetChecked($sgEmailStatus, $emailStatus);
@@ -635,6 +646,7 @@ $sgThemeCloseText = @sgGetValue($sgThemeCloseText, $themeCloseText);
635
  $duration = @sgGetValue($duration, $defaultDuration);
636
  $sgOnceExpiresTime = @sgGetValue($sgOnceExpiresTime, $onceExpiresTime);
637
  $sgPopupAppearNumberLimit = @sgGetValue($sgPopupAppearNumberLimit, $popupAppearNumberLimit);
 
638
  $delay = @sgGetValue($delay, $defaultDelay);
639
  $sgInactivityTimout = @sgGetValue($sgInactivityTimout, $inactivityTimout);
640
  $sgContentClickBehavior = @sgGetValue($sgContentClickBehavior, $contentClickBehavior);
@@ -1337,6 +1349,16 @@ if (isset($_GET["titleError"])): ?>
1337
  <span class="dashicons dashicons-info repeatPopup same-image-style"></span><span class="infoSelectRepeat samefontStyle">If this option is checked popup's cookie will be saved for a current page.By default cookie is set for all site.</span>
1338
  </div>
1339
  <?php endif;?>
 
 
 
 
 
 
 
 
 
 
1340
 
1341
  <span class="liquid-width">Change overlay color:</span><div id="color-picker"><input class="sgOverlayColor" id="sgOverlayColor" type="text" name="sgOverlayColor" value="<?php echo esc_attr(@$sgOverlayColor); ?>" /></div><br>
1342
 
139
  $sgAllCustomPostsStatus = @$jsonData['allCustomPostsStatus'];
140
  $sgPostsAllCategories = @$jsonData['posts-all-categories'];
141
  $sgRepeatPopup = @$jsonData['repeatPopup'];
142
+ $sgRepetitivePopup = @$jsonData['repetitivePopup'];
143
  $sgPopupAppearNumberLimit = @$jsonData['popup-appear-number-limit'];
144
+ $sgRepetitivePopupPeriod = @$jsonData['repetitivePopupPeriod'];
145
  $sgPopupCookiePageLevel = @$jsonData['save-cookie-page-level'];
146
  $sgDisablePopup = @$jsonData['disablePopup'];
147
  $sgDisablePopupOverlay = @$jsonData['disablePopupOverlay'];
148
  $sgPopupClosingTimer = @$jsonData['popupClosingTimer'];
149
  $sgAutoClosePopup = @$jsonData['autoClosePopup'];
150
+ $sgRandomPopup = @$jsonData['randomPopup'];
151
  $sgCountryStatus = @$jsonData['countryStatus'];
152
  $sgAllSelectedPages = @$jsonData['allSelectedPages'];
153
  $sgAllSelectedCustomPosts = @$jsonData['allSelectedCustomPosts'];
304
  'overlayClose' => true,
305
  'reopenAfterSubmission' => false,
306
  'contentClick'=>false,
307
+ 'repetitivePopup' => false,
308
  'fixed' => false,
309
  'top' => false,
310
  'right' => false,
332
  'disablePopupOverlay' => false,
333
  'redirect-to-new-tab' => true,
334
  'autoClosePopup' => false,
335
+ 'randomPopup' => false,
336
  'fbStatus' => true,
337
  'twitterStatus' => true,
338
  'emailStatus' => true,
351
  'allCustomPostsStatus' => false,
352
  'onceExpiresTime' => 7,
353
  'popup-appear-number-limit' => 1,
354
+ 'repetitivePopupPeriod' => 60,
355
  'save-cookie-page-level' => false,
356
  'overlay-custom-classs' => 'sg-popup-overlay',
357
  'content-custom-classs' => 'sg-popup-content',
427
  $overlayClose = sgBoolToChecked($sgPopup['overlayClose']);
428
  $reopenAfterSubmission = sgBoolToChecked($sgPopup['reopenAfterSubmission']);
429
  $contentClick = sgBoolToChecked($sgPopup['contentClick']);
430
+ $repetitivePopup = sgBoolToChecked($sgPopup['repetitivePopup']);
431
  $contentClickBehavior = $sgPopup['content-click-behavior'];
432
  $theme3BorderRadius = $sgPopup['sgTheme3BorderRadius'];
433
  $popupZIndex = $sgPopup['popup-z-index'];
445
  $disablePopup = sgBoolToChecked($popupProDefaultValues['disablePopup']);
446
  $disablePopupOverlay = sgBoolToChecked($popupProDefaultValues['disablePopupOverlay']);
447
  $autoClosePopup = sgBoolToChecked($popupProDefaultValues['autoClosePopup']);
448
+ $randomPopup = sgBoolToChecked($popupProDefaultValues['randomPopup']);
449
  $fbStatus = sgBoolToChecked($popupProDefaultValues['fbStatus']);
450
  $twitterStatus = sgBoolToChecked($popupProDefaultValues['twitterStatus']);
451
  $emailStatus = sgBoolToChecked($popupProDefaultValues['emailStatus']);
471
  $saveCookiePageLevel = sgBoolToChecked($popupProDefaultValues['save-cookie-page-level']);
472
  $onceExpiresTime = $popupProDefaultValues['onceExpiresTime'];
473
  $popupAppearNumberLimit = $popupProDefaultValues['popup-appear-number-limit'];
474
+ $repetitivePopupPeriod = $popupProDefaultValues['repetitivePopupPeriod'];
475
  $countryStatus = sgBoolToChecked($popupProDefaultValues['countryStatus']);
476
  $allowCountries = $popupProDefaultValues['allowCountries'];
477
  $logedUser = $popupProDefaultValues['loggedin-user'];
580
  $sgPopupTimerStatus = @sgSetChecked($sgPopupTimerStatus, $popupTimerStatus);
581
  $sgPopupScheduleStatus = @sgSetChecked($sgPopupScheduleStatus, $popupScheduleStatus);
582
  $sgRepeatPopup = @sgSetChecked($sgRepeatPopup, $repetPopup);
583
+ $sgRepetitivePopup = @sgSetChecked($sgRepetitivePopup, $repetitivePopup);
584
  $sgDisablePopup = @sgSetChecked($sgDisablePopup, $disablePopup);
585
  $sgDisablePopupOverlay = @sgSetChecked($sgDisablePopupOverlay, $disablePopupOverlay);
586
  $sgAutoClosePopup = @sgSetChecked($sgAutoClosePopup, $autoClosePopup);
587
+ $sgRandomPopup = @sgSetChecked($sgRandomPopup, $randomPopup);
588
  $sgFbStatus = @sgSetChecked($sgFbStatus, $fbStatus);
589
  $sgTwitterStatus = @sgSetChecked($sgTwitterStatus, $twitterStatus);
590
  $sgEmailStatus = @sgSetChecked($sgEmailStatus, $emailStatus);
646
  $duration = @sgGetValue($duration, $defaultDuration);
647
  $sgOnceExpiresTime = @sgGetValue($sgOnceExpiresTime, $onceExpiresTime);
648
  $sgPopupAppearNumberLimit = @sgGetValue($sgPopupAppearNumberLimit, $popupAppearNumberLimit);
649
+ $sgRepetitivePopupPeriod = @sgGetValue($sgRepetitivePopupPeriod, $repetitivePopupPeriod);
650
  $delay = @sgGetValue($delay, $defaultDelay);
651
  $sgInactivityTimout = @sgGetValue($sgInactivityTimout, $inactivityTimout);
652
  $sgContentClickBehavior = @sgGetValue($sgContentClickBehavior, $contentClickBehavior);
1349
  <span class="dashicons dashicons-info repeatPopup same-image-style"></span><span class="infoSelectRepeat samefontStyle">If this option is checked popup's cookie will be saved for a current page.By default cookie is set for all site.</span>
1350
  </div>
1351
  <?php endif;?>
1352
+
1353
+ <?php if(!sgRemoveOption('repetitivePopup')): ?>
1354
+ <span class="liquid-width">Repetitive popup:</span><input class="input-width-static js-checkbox-acordion" id="js-popup-only-once" type="checkbox" name="repetitivePopup" <?php echo $sgRepetitivePopup;?>>
1355
+ <span class="dashicons dashicons-info repeatPopup same-image-style"></span><span class="infoSelectRepeat samefontStyle">Show the popup to a user only once.</span><br>
1356
+ <div class="acordion-main-div-content js-popup-only-once-content">
1357
+ <span class="liquid-width">show popup</span>
1358
+ <input type="number" class="before-scroling-percent" name="repetitivePopupPeriod" min="10" value="<?php echo esc_attr($sgRepetitivePopupPeriod); ?>">
1359
+ <span class="span-percent">after X seconds</span>
1360
+ </div>
1361
+ <?php endif;?>
1362
 
1363
  <span class="liquid-width">Change overlay color:</span><div id="color-picker"><input class="sgOverlayColor" id="sgOverlayColor" type="text" name="sgOverlayColor" value="<?php echo esc_attr(@$sgOverlayColor); ?>" /></div><br>
1364
 
files/sg_popup_save.php CHANGED
@@ -249,6 +249,10 @@ function sgPopupSave()
249
  );
250
 
251
  function setPopupForAllPages($id, $data, $type) {
 
 
 
 
252
  SGPopup::addPopupForAllPages($id, $data, $type);
253
  }
254
 
@@ -509,11 +513,17 @@ function updatePopupOptions($id, $postTypes, $isInsert) {
509
  }
510
  else {
511
  $allPosts[$key]['popstTypes'] = $popupPostTypes;
 
 
 
512
  }
513
 
514
  }
515
  else if($isInsert && !empty($postTypes)) {
516
  $data = array('id'=>$id, 'popstTypes'=>$postTypes);
 
 
 
517
  array_push($allPosts, $data);
518
  }
519
 
249
  );
250
 
251
  function setPopupForAllPages($id, $data, $type) {
252
+ //-1 is the home page key
253
+ if(is_array($data) && $data[0] == -1 && defined('ICL_LANGUAGE_CODE')) {
254
+ $data[0] .='_'.ICL_LANGUAGE_CODE;
255
+ }
256
  SGPopup::addPopupForAllPages($id, $data, $type);
257
  }
258
 
513
  }
514
  else {
515
  $allPosts[$key]['popstTypes'] = $popupPostTypes;
516
+ if(defined('ICL_LANGUAGE_CODE')){
517
+ $allPosts[$key]['lang'] = ICL_LANGUAGE_CODE;
518
+ }
519
  }
520
 
521
  }
522
  else if($isInsert && !empty($postTypes)) {
523
  $data = array('id'=>$id, 'popstTypes'=>$postTypes);
524
+ if(defined('ICL_LANGUAGE_CODE')){
525
+ $data['lang'] = ICL_LANGUAGE_CODE;
526
+ }
527
  array_push($allPosts, $data);
528
  }
529
 
helpers/Integrate_external_settings.php CHANGED
@@ -184,7 +184,11 @@ Class IntegrateExternalSettings {
184
  'countdownOptions' => json_encode($params['countdownOptions']),
185
  'exitIntentOptions' => json_encode($params['exitIntentOptions']),
186
  'videoOptions' => json_encode($params['videoOptions']),
187
- 'fblikeOptions' => json_encode($params['fblikeOptions'])
 
 
 
 
188
  );
189
 
190
  return $options;
184
  'countdownOptions' => json_encode($params['countdownOptions']),
185
  'exitIntentOptions' => json_encode($params['exitIntentOptions']),
186
  'videoOptions' => json_encode($params['videoOptions']),
187
+ 'fblikeOptions' => json_encode($params['fblikeOptions']),
188
+ 'repetitivePopup' => sgSanitize('repetitivePopup'),
189
+ 'repetitivePopupPeriod' => sgSanitize('repetitivePopupPeriod'),
190
+ 'randomPopup' => sgSanitize('randomPopup')
191
+
192
  );
193
 
194
  return $options;
javascript/sg_popup_frontend.js CHANGED
@@ -680,24 +680,33 @@ SGPopup.prototype.colorboxEventsListener = function () {
680
 
681
  var that = this;
682
  var disablePageScrolling = this.varToBool(this.popupData['disable-page-scrolling']);
 
 
 
 
683
 
684
  jQuery('#sgcolorbox').on("sgColorboxOnOpen", function () {
685
  if(disablePageScrolling) {
686
- jQuery('html, body').css({ overflow: 'hidden' });
687
  }
688
  });
689
 
690
  jQuery('#sgcolorbox').on("sgColorboxOnCompleate", function () {
691
-
692
  });
693
 
694
  jQuery('#sgcolorbox').on("sgPopupCleanup", function () {
695
-
 
 
 
 
 
696
  });
697
 
698
  jQuery('#sgcolorbox').on("sgPopupClose", function () {
699
  if(disablePageScrolling) {
700
- jQuery('html, body').css({ overflow: '' });
701
  }
702
  });
703
 
680
 
681
  var that = this;
682
  var disablePageScrolling = this.varToBool(this.popupData['disable-page-scrolling']);
683
+ var repetitivePopup = this.popupData['repetitivePopup'];
684
+ var repetitivePopupPeriod = this.popupData['repetitivePopupPeriod'];
685
+ repetitivePopupPeriod = parseInt(repetitivePopupPeriod)*1000;
686
+ var repetitiveTimeout = null;
687
 
688
  jQuery('#sgcolorbox').on("sgColorboxOnOpen", function () {
689
  if(disablePageScrolling) {
690
+ jQuery('body').css({ overflow: 'hidden' });
691
  }
692
  });
693
 
694
  jQuery('#sgcolorbox').on("sgColorboxOnCompleate", function () {
695
+ clearInterval(repetitiveTimeout);
696
  });
697
 
698
  jQuery('#sgcolorbox').on("sgPopupCleanup", function () {
699
+ if(repetitivePopup) {
700
+ repetitiveTimeout = setTimeout(function() {
701
+ var sgPoupFrontendObj = new SGPopup();
702
+ sgPoupFrontendObj.popupOpenById(that.popupData['id']);
703
+ }, repetitivePopupPeriod);
704
+ }
705
  });
706
 
707
  jQuery('#sgcolorbox').on("sgPopupClose", function () {
708
  if(disablePageScrolling) {
709
+ jQuery('body').css({ overflow: '' });
710
  }
711
  });
712
 
popup-builder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Popup Builder
4
  * Plugin URI: http://sygnoos.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.1
7
  * Author: Popup Builder
8
  * Author URI: http://www.sygnoos.com
9
  * License: GPLv2
@@ -184,6 +184,7 @@ function sgShowShortCode($args, $content)
184
  ob_end_clean();
185
  return do_shortcode($shortcodeContent);
186
  }
 
187
  add_shortcode('sg_popup', 'sgShowShortCode');
188
 
189
  function sgRenderPopupOpen($popupId)
@@ -381,6 +382,8 @@ function sgOnloadPopup()
381
  else {
382
  $popupsId = json_encode(array());
383
  }
 
 
384
  echo '<script type="text/javascript">
385
  SG_POPUPS_QUEUE = '.$popupsId.'</script>';
386
  }
3
  * Plugin Name: Popup Builder
4
  * Plugin URI: http://sygnoos.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.2
7
  * Author: Popup Builder
8
  * Author URI: http://www.sygnoos.com
9
  * License: GPLv2
184
  ob_end_clean();
185
  return do_shortcode($shortcodeContent);
186
  }
187
+
188
  add_shortcode('sg_popup', 'sgShowShortCode');
189
 
190
  function sgRenderPopupOpen($popupId)
382
  else {
383
  $popupsId = json_encode(array());
384
  }
385
+ $popupsId = SgPopupPro::filterForRandomIds($popupsId);
386
+
387
  echo '<script type="text/javascript">
388
  SG_POPUPS_QUEUE = '.$popupsId.'</script>';
389
  }
readme.txt CHANGED
@@ -38,6 +38,7 @@ With popup builder plugin you can insert any type of content, right into your Po
38
  * Customize popup overlay color and opacity
39
  * Add custom class for popup overlay
40
  * Add custom class for popup content
 
41
  * Redirect user to another page when he/she clicks on popup content
42
  * Show/Hide Popup for selected User Roles (Admin panel)
43
  * Responsive popup
@@ -91,6 +92,8 @@ With popup builder plugin you can insert any type of content, right into your Po
91
 
92
  * Show popup only when user is scrolling - sometimes you don't want to show the popup right away, it's a good idea to set this option so the popup will be shown to the visitor only when he scrolls.
93
 
 
 
94
  * Show popup once per visitor - useful when you don't want to show the popup to the same visitor more than once.
95
 
96
  * Don't show popup on mobile devices - after activating this option, popup won't be shown in mobile devices.
@@ -161,6 +164,13 @@ Go to the Popup Builder settings and set your desired options.
161
 
162
  == Changelog ==
163
 
 
 
 
 
 
 
 
164
  = Version 2.6.1 =
165
  * Shortcode detection optimizations.
166
 
38
  * Customize popup overlay color and opacity
39
  * Add custom class for popup overlay
40
  * Add custom class for popup content
41
+ * Repetitive pop-up - show popup every X period of time
42
  * Redirect user to another page when he/she clicks on popup content
43
  * Show/Hide Popup for selected User Roles (Admin panel)
44
  * Responsive popup
92
 
93
  * Show popup only when user is scrolling - sometimes you don't want to show the popup right away, it's a good idea to set this option so the popup will be shown to the visitor only when he scrolls.
94
 
95
+ * Random popups option - this option is useful if you need to show random popups to your visitors. Let's say you are running ecommerce website and want to show discount codes. With random popup options ON you will be able to show different offers to your customers.
96
+
97
  * Show popup once per visitor - useful when you don't want to show the popup to the same visitor more than once.
98
 
99
  * Don't show popup on mobile devices - after activating this option, popup won't be shown in mobile devices.
164
 
165
  == Changelog ==
166
 
167
+ = Version 2.6.2 =
168
+ * Bug fixed connected to page scrolling behind the popup.
169
+ * Added new option `repetitive popup` to show popup every X period of time.
170
+ * Added option to sho random popups (PRO).
171
+ * Improved compatibility with WPML (PRO).
172
+ * Typo fixes.
173
+
174
  = Version 2.6.1 =
175
  * Shortcode detection optimizations.
176