Popup Builder – Responsive WordPress Pop up - Version 2.6.7

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
Comparing to
See all releases

Code changes from version 2.6.6 to 2.6.7

classes/SGPopup.php CHANGED
@@ -305,7 +305,7 @@ abstract class SGPopup {
305
  }';
306
 
307
  /* if popup close button has delay,hide it */
308
- if (@$options['closeButton'] && @$options['buttonDelayValue']) {
309
  $styles .= '.sg-popup-content-'.$popupId.' #sgcboxClose {
310
  display: none !important;
311
  }';
305
  }';
306
 
307
  /* if popup close button has delay,hide it */
308
+ if ($options['closeButton'] && $options['buttonDelayValue']) {
309
  $styles .= '.sg-popup-content-'.$popupId.' #sgcboxClose {
310
  display: none !important;
311
  }';
config.php CHANGED
@@ -25,7 +25,7 @@ if(!class_exists('SgPopupBuilderConfig')) {
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.66);
28
- define('SG_POPUP_PRO_VERSION', 3.376);
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/');
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.66);
28
+ define('SG_POPUP_PRO_VERSION', 3.377);
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/');
files/sg_functions.php CHANGED
@@ -431,7 +431,7 @@ class SGFunctions
431
  <a class="sg-info-links" target="_blank" href="https://sygnoos.ladesk.com/submit_ticket"><span class="dashicons dashicons-megaphone sg-info-text-white"></span></span> Submit Ticket</a>
432
  </li>
433
  <li>
434
- <a class="sg-info-links" target="_blank" href="https://wordpress.org/support/plugin/popup-builder"><span class="dashicons dashicons-admin-plugins sg-info-text-white"></span></span> Support</a>
435
  </li>
436
  <li>
437
  <a class="sg-info-links" target="_blank" href="https://wordpress.org/plugins/popup-builder/faq/"><span class="dashicons dashicons-editor-help sg-info-text-white"></span> FAQ</a>
@@ -454,74 +454,47 @@ class SGFunctions
454
  return $reviewPanel;
455
  }
456
 
457
- public static function blackFridayNotice()
458
  {
459
  $reviewPanel = '';
460
- wp_register_style('blackFriday', SG_APP_POPUP_URL . '/style/blackFriday.css');
461
  wp_enqueue_style('blackFriday');
462
- wp_register_script('blackFriday', SG_APP_POPUP_URL . '/javascript/blackFriday.js', array(), SG_POPUP_VERSION);
463
  wp_enqueue_script('blackFriday');
464
- $ajaxNonce = wp_create_nonce("sgPopupBuilderReview");
465
- $discountDay11 = get_option('blackfriday');
466
-
467
- $timeDate = new DateTime('now', new DateTimeZone('Asia/Yerevan'));
468
  $timeNow = strtotime($timeDate->format('Y-m-d H:i:s'));
469
- $startTime = '1511308500';
470
- $endData = '1511826900';
 
 
471
 
472
- if(!($timeNow > $startTime && $timeNow < $endData) || $discountDay11) {
473
- return $reviewPanel;
474
- }
 
 
 
475
  ob_start();
476
  ?>
477
- <div class="sg-info-panel-wrapper sg-info-panel-black-friday">
478
- <div class="sg-info-panel-row">
479
- <div class="sg-info-panel-col-3" style="margin-left: 0;">
480
- <div class="sg-black-friday-day">
481
- <div style="width: 100%;display: inline-block;">
482
- <h1 style="font-size: 50px;color: #ffffff;font-weight: 200;margin: 0;text-align: center;">24.11</h1>
483
- <h1 style="font-size: 60px;color: #ffffff;font-weight: bold;margin: 0;text-align: center;">BLACK</h1>
484
- <h1 style="font-size: 60px;color: #ffffff;font-weight: bold;margin: 0;text-align: center;">FRIDAY</h1>
485
- </div>
486
- </div>
487
- </div>
488
- <div class="sg-info-panel-col-3 sg-info-text-center" style="margin-right: 2%;">
489
- <div class="sg-discount-info-wrapper">
490
- <h1 class="sg-discount-sale" style="color: red;font-size: 100px;font-weight: bold;margin: 0;">SALE</h1>
491
- <h1 class="sg-discount-percent" style="color: red;font-size: 80px;font-weight: bold;margin: 0;">25 % OFF</h1>
492
- </div>
493
- </div>
494
- <div class="sg-info-panel-col-3">
495
- <div class="sg-black-friday-day">
496
- <div style="width: 100%;display: inline-block;">
497
- <h1 style="font-size: 50px;color: #ffffff;font-weight: 200;margin: 0;text-align: center;">27.11</h1>
498
- <h1 style="font-size: 60px;color: #ffffff;font-weight: bold;margin: 0;text-align: center;font-family: 'good times';">CYBER</h1>
499
- <h1 style="font-size: 60px;color: #ffffff;font-weight: bold;margin: 0;text-align: center;font-family: 'good times';">MONDAY</h1>
500
- </div>
501
- </div>
502
  </div>
503
- </div>
504
- <div class="sg-info-panel-row">
505
- <div style="width: 82%;display: inline-block;">
506
- <div style="float: left;">
507
- <h1 style="font-size: 25px;color: #ffffff;font-weight: lighter;text-align: center;margin: 0 0px 0 30px;">21-28, November, 2017</h1>
508
- </div>
509
- <div style="float: right;">
510
- <h1 style="font-size: 25px;color: #ffffff;font-weight: lighter;text-align: center;margin: 0 0px 0 -55px;">
511
- <a href="https://popup-builder.com" target="_blank">visit our website</a>
512
- </h1>
513
- </div>
514
- </div>
515
- </div>
516
- <div>
517
- <?php echo '<span class="sg-dont-show-agin sg-dont-show-again-day11" data-ajaxnonce="'.esc_attr($ajaxNonce).'">Don’t show again.</span>'; ?>
518
  </div>
519
  </div>
520
  <?php
521
- $reviewPanel = ob_get_contents();
522
  ob_end_clean();
523
 
524
- return $reviewPanel;
525
  }
526
 
527
  public static function noticeForShortcode() {
@@ -954,40 +927,4 @@ class SGFunctions
954
  <option value="ZW">Zimbabwe</option>
955
  </select>';
956
  }
957
-
958
- public static function blackFriday()
959
- {
960
- $reviewPanel = '';
961
- wp_register_style('blackFriday', SG_APP_POPUP_URL . '/style/blackFriday.css');
962
- wp_enqueue_style('blackFriday');
963
- wp_register_script('blackFriday', SG_APP_POPUP_URL . '/javascript/blackFriday.js', array(), SG_POPUP_VERSION);
964
- wp_enqueue_script('blackFriday');
965
- $ajaxNonce = wp_create_nonce("sgPopupBuilderReview");
966
- $discountDay11 = get_option('discountDay11');
967
-
968
- $timeDate = new DateTime('now', new DateTimeZone('Asia/Yerevan'));
969
- $timeNow = strtotime($timeDate->format('Y m d H:i:s'));
970
- $startTime = '1510244520';
971
- $endData = '1511826900';
972
-
973
- if(!($timeNow > $startTime && $timeNow < $endData) || $discountDay11) {
974
- return $reviewPanel;
975
- }
976
-
977
- ob_start();
978
- ?>
979
- <div class="sg-info-panel-wrapper">
980
- <div class="sg-info-panel-row" onclick="window.open('https://popup-builder.com/')">
981
- </div>
982
- <div>
983
- <div class="sgpb-visit-web-site" onclick="window.open('https://popup-builder.com/')"><span>Visit our website</span></div>
984
- <?php echo '<span class="sg-dont-show-agin" data-discount="discountDay11" data-ajaxnonce="'.esc_attr($ajaxNonce).'">Don’t show again.</span>'; ?>
985
- </div>
986
- </div>
987
- <?php
988
- $reviewPanel = ob_get_contents();
989
- ob_end_clean();
990
-
991
- return $reviewPanel;
992
- }
993
  }
431
  <a class="sg-info-links" target="_blank" href="https://sygnoos.ladesk.com/submit_ticket"><span class="dashicons dashicons-megaphone sg-info-text-white"></span></span> Submit Ticket</a>
432
  </li>
433
  <li>
434
+ <a class="sg-info-links" target="_blank" href="https://wordpress.org/support/plugin/popup-builder"><span class="dashicons dashicons-admin-plugins sg-info-text-white"></span> Support</a>
435
  </li>
436
  <li>
437
  <a class="sg-info-links" target="_blank" href="https://wordpress.org/plugins/popup-builder/faq/"><span class="dashicons dashicons-editor-help sg-info-text-white"></span> FAQ</a>
454
  return $reviewPanel;
455
  }
456
 
457
+ public static function newYear()
458
  {
459
  $reviewPanel = '';
460
+ wp_register_style('blackFriday', SG_APP_POPUP_URL . '/style/newYear.css');
461
  wp_enqueue_style('blackFriday');
462
+ wp_register_script('blackFriday', SG_APP_POPUP_URL . '/javascript/NewYear.js', array(), SG_POPUP_VERSION);
463
  wp_enqueue_script('blackFriday');
464
+ $ajaxNonce = wp_create_nonce("sgPopupBuilderNewYear");
465
+ $newYearShow = get_option('sgPopupBuilderNewYear');
466
+ $timeDate = new DateTime('now', new DateTimeZone('Asia/Yerevan'));
 
467
  $timeNow = strtotime($timeDate->format('Y-m-d H:i:s'));
468
+ $startTime = '1513343100';
469
+ $endData = '1515369540';
470
+ $currentUser = wp_get_current_user();
471
+ $niceName = '';
472
 
473
+ if (!empty($currentUser)) {
474
+ $niceName = $currentUser->nickname;
475
+ }
476
+ if(!($timeNow > $startTime && $timeNow < $endData) || $newYearShow) {
477
+ return $reviewPanel;
478
+ }
479
  ob_start();
480
  ?>
481
+ <div style="margin-right: 15px;">
482
+ <div class="sg-info-panel-wrapper sg-info-panel-new-year">
483
+
484
+ <div class="sg-new-year-text-wrapper">
485
+ <p>Hi <?php echo $niceName; ?></p>
486
+ <p>Merry Christmas and Happy New Year</p>
487
+ <p>Take your 25% sale right now!</p>
488
+ <button onclick="window.open('https://popup-builder.com/')" class="sgpb-happy-button" >USE THIS CODE: HAPPY 25</button>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
489
  </div>
490
+ <span data-ajaxnonce="<?php echo $ajaxNonce; ?>" class="sgpb-new-year-dont-show">Don’t show again</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
491
  </div>
492
  </div>
493
  <?php
494
+ $newYearPanel = ob_get_contents();
495
  ob_end_clean();
496
 
497
+ return $newYearPanel;
498
  }
499
 
500
  public static function noticeForShortcode() {
927
  <option value="ZW">Zimbabwe</option>
928
  </select>';
929
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
930
  }
files/sg_popup_actions.php CHANGED
@@ -40,16 +40,16 @@ class sgPopupActions {
40
  }
41
  }
42
 
43
- public function blackFriday()
44
  {
45
- $messageContent = SGFunctions::blackFridayNotice();
46
 
47
  echo $messageContent;
48
  }
49
 
50
  public function popupBuilderShowReviewNotice()
51
  {
52
- $this->blackFriday();
53
  $messageContent = '';
54
  $maxOpenPopupStatus = SGFunctions::shouldOpenForMaxOpenPopupMessage();
55
  $shouldOpenForDays = SGFunctions::shouldOpenReviewPopupForDays();
40
  }
41
  }
42
 
43
+ public function newYear()
44
  {
45
+ $messageContent = SGFunctions::newYear();
46
 
47
  echo $messageContent;
48
  }
49
 
50
  public function popupBuilderShowReviewNotice()
51
  {
52
+ $this->newYear();
53
  $messageContent = '';
54
  $maxOpenPopupStatus = SGFunctions::shouldOpenForMaxOpenPopupMessage();
55
  $shouldOpenForDays = SGFunctions::shouldOpenReviewPopupForDays();
files/sg_popup_ajax.php CHANGED
@@ -26,16 +26,15 @@ function sgPopupDelete()
26
 
27
  add_action('wp_ajax_delete_popup', 'sgPopupDelete');
28
 
29
- function sgpbBlackFriday()
30
  {
31
- //check_ajax_referer('sgPopupBuilderReview', 'nonce');
32
- $discountDay = sanitize_text_field($_POST['discountDay']);
33
 
34
- echo update_option('blackfriday', 1);
35
  wp_die();
36
  }
37
 
38
- add_action('wp_ajax_sgpbBlackFriday', 'sgpbBlackFriday');
39
 
40
  function sgFrontend()
41
  {
26
 
27
  add_action('wp_ajax_delete_popup', 'sgPopupDelete');
28
 
29
+ function sgpbNewYear()
30
  {
31
+ check_ajax_referer('sgPopupBuilderNewYear', 'nonce');
 
32
 
33
+ echo update_option('sgPopupBuilderNewYear', 1);
34
  wp_die();
35
  }
36
 
37
+ add_action('wp_ajax_sgpbNewYear', 'sgpbNewYear');
38
 
39
  function sgFrontend()
40
  {
files/sg_popup_media_button.php CHANGED
@@ -40,6 +40,81 @@ function sgPopupMediaButton()
40
 
41
  add_action('media_buttons', 'sgPopupMediaButton', 11);
42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  function sgPopupMediaButtonThickboxs()
44
  {
45
  global $pagenow, $typenow;
@@ -157,4 +232,5 @@ function sgPopupMediaButtonThickboxs()
157
  <?php endif;
158
  }
159
 
160
- add_action('admin_footer', 'sgPopupMediaButtonThickboxs');
 
40
 
41
  add_action('media_buttons', 'sgPopupMediaButton', 11);
42
 
43
+ function sgpbPopupVariable()
44
+ {
45
+ $showCurrentUser = SGFunctions::isShowMenuForCurrentUser();
46
+ if (!$showCurrentUser) {
47
+ return;
48
+ }
49
+
50
+ $buttonTitle = 'Insert custom JS variable';
51
+ $output = '';
52
+
53
+ $currentPageParams = get_object_vars(get_current_screen());
54
+
55
+ if ($currentPageParams['id'] != 'popup-builder_page_edit-popup') {
56
+ return '';
57
+ }
58
+ wp_enqueue_script('jquery-ui-dialog');
59
+ wp_register_style('sg_jQuery_ui', SG_APP_POPUP_URL . "/style/jQueryDialog/jquery-ui.css");
60
+ wp_enqueue_style('sg_jQuery_ui');
61
+
62
+ $img = '<span class="dashicons dashicons-welcome-widgets-menus" id="sg-popup-js-variable" style="padding: 3px 2px 0px 0px"></span>';
63
+ $output = '<a href="javascript:void(0);" onclick="jQuery(\'#sgpb-js-variable-thickbox\').dialog({ width: 500, modal: true, title: \'Insert JS variable\', dialogClass: \'sg-popup-builder\' });" class="button" title="'.$buttonTitle.'" style="padding-left: .4em;">'. $img.$buttonTitle.'</a>';
64
+
65
+ echo $output;
66
+ return '';
67
+ }
68
+
69
+ add_action('media_buttons', 'sgpbPopupVariable', 11);
70
+
71
+ function sgJsVariableThickbox() {
72
+
73
+ $currentPageParams = get_object_vars(get_current_screen());
74
+
75
+ if($currentPageParams['id'] != 'popup-builder_page_edit-popup') {
76
+ return '';
77
+ }
78
+ ?>
79
+ <script type="text/javascript">
80
+ jQuery(document).ready(function ($) {
81
+ $('#sgpb-insert-variable').on('click', function (e) {
82
+ var jsVariableSelector = jQuery('.sgpb-js-variable-selector').val();
83
+ var jsVariableAttribute = jQuery('.sgpb-js-variable-attribute').val();
84
+
85
+ if (jsVariableSelector == '' || jsVariableAttribute == '') {
86
+ alert('Please, fill in all the fields.');
87
+ return;
88
+ }
89
+ window.send_to_editor('[pbvariable selector="' + jsVariableSelector + '" attribute="'+jsVariableAttribute+'"]');
90
+ jQuery('#sgpb-js-variable-thickbox').dialog('close')
91
+ });
92
+ });
93
+ </script>
94
+ <div id="sgpb-js-variable-thickbox" style="display: none;">
95
+ <div class="wrap">
96
+ <p>Insert JS variable inside the popup.</p>
97
+ <div>
98
+ <div style="margin-bottom: 5px;">
99
+ <span>Selector</span>
100
+ <input type="text" class="sgpb-js-variable-selector">
101
+ <span>Ex. #myselector or .myselector</span>
102
+ </div>
103
+ <div>
104
+ <span>Attribute</span>
105
+ <input type="text" class="sgpb-js-variable-attribute">
106
+ <span>Ex. value or data-name</span>
107
+ </div>
108
+ </div>
109
+ <p class="submit">
110
+ <input type="button" id="sgpb-insert-variable" class="button-primary dashicons-welcome-widgets-menus" value="Insert"/>
111
+ <a id="sgpb-cancel" class="button-secondary" onclick="jQuery('#sgpb-js-variable-thickbox').dialog( 'close' )" title="Cancel">Cancel</a>
112
+ </p>
113
+ </div>
114
+ </div>
115
+ <?php
116
+ }
117
+
118
  function sgPopupMediaButtonThickboxs()
119
  {
120
  global $pagenow, $typenow;
232
  <?php endif;
233
  }
234
 
235
+ add_action('admin_footer', 'sgPopupMediaButtonThickboxs');
236
+ add_action('admin_footer', 'sgJsVariableThickbox');
img/balck-friday-div-line.png DELETED
Binary file
img/day11Bg.jpg DELETED
Binary file
img/newYearBg.jpg ADDED
Binary file
javascript/NewYear.js ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function SGPBNewYear() {
2
+
3
+ }
4
+
5
+ SGPBNewYear.prototype.init = function() {
6
+
7
+ var dontSowAgain = jQuery('.sgpb-new-year-dont-show');
8
+
9
+ if (!dontSowAgain.length) {
10
+ return false;
11
+ }
12
+
13
+ dontSowAgain.bind('click', function() {
14
+ jQuery('.sg-info-panel-wrapper').remove();
15
+ var nonce = jQuery(this).attr('data-ajaxnonce');
16
+ var data = {
17
+ nonce: nonce,
18
+ action: 'sgpbNewYear'
19
+ };
20
+
21
+ jQuery.post(ajaxurl, data, function() {
22
+
23
+ })
24
+ });
25
+ };
26
+
27
+ jQuery(document).ready(function() {
28
+ var newYearObj = new SGPBNewYear();
29
+ newYearObj.init();
30
+ });
javascript/blackFriday.js DELETED
@@ -1,29 +0,0 @@
1
- function sgpbBlackFriday() {
2
-
3
- }
4
- sgpbBlackFriday.prototype.init = function()
5
- {
6
- if (!jQuery('.sg-dont-show-agin').length) {
7
- return false;
8
- }
9
- var that = this;
10
-
11
- jQuery('.sg-dont-show-agin').bind('click', function() {
12
- var nonce = jQuery(this).attr('data-ajaxnonce');
13
- var discountDay = 1;/*jQuery(this).attr('data-discount');*/
14
-
15
- var data = {
16
- action: 'sgpbBlackFriday',
17
- nonce: nonce
18
- };
19
-
20
- jQuery('.sg-info-panel-wrapper').remove();
21
- jQuery.post(ajaxurl, data, function(responce) {
22
- });
23
- });
24
- };
25
-
26
- jQuery(document).ready(function() {
27
- var obj = new sgpbBlackFriday();
28
- obj.init();
29
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
javascript/sg_popup_frontend.js CHANGED
@@ -312,7 +312,7 @@ SGPopup.prototype.sgCustomizeThemes = function (popupId) {
312
  var contentBackgroundColor = popupData['sg-content-background-color'];
313
  var changedColor = popupContentColor.replace(')', ', '+popupContentOpacity+')').replace('rgb', 'rgba');
314
 
315
- if(contentBackgroundColor != '') {
316
  changedColor = this.hexToRgba(contentBackgroundColor, popupContentOpacity);
317
  }
318
 
@@ -766,7 +766,7 @@ SGPopup.prototype.htmlIframeFilterForOpen = function (popupEventName) {
766
  var popupId = this.popupData['id'];
767
  var popupContentWrapper = jQuery('#sg-popup-content-wrapper-'+popupId);
768
 
769
- if(!popupContentWrapper.length) {
770
  return;
771
  }
772
 
@@ -784,8 +784,68 @@ SGPopup.prototype.htmlIframeFilterForOpen = function (popupEventName) {
784
  return;
785
  };
786
 
787
- SGPopup.prototype.colorboxEventsListener = function () {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
788
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
789
  var that = this;
790
  var disablePageScrolling = this.varToBool(this.popupData['disable-page-scrolling']);
791
  var popupOpenSound = this.varToBool(this.popupData['popupOpenSound']);
@@ -804,7 +864,9 @@ SGPopup.prototype.colorboxEventsListener = function () {
804
  if(popupOpenSound && popupOpenSoundFile && typeof that.audio == 'undefined') {
805
  that.audio = new Audio(popupOpenSoundFile);
806
  }
807
- jQuery('#sgcolorbox').on("sgColorboxOnOpen", function () {
 
 
808
  if(disablePageScrolling) {
809
  jQuery('body').addClass('sgpb-disable-page-scrolling');
810
  }
@@ -879,7 +941,6 @@ SGPopup.prototype.colorboxEventsListener = function () {
879
  that.htmlIframeFilterForOpen('close');
880
  }
881
  });
882
-
883
  };
884
 
885
  SGPopup.prototype.sgShowColorboxWithOptions = function () {
@@ -1069,8 +1130,11 @@ SGPopup.prototype.sgShowColorboxWithOptions = function () {
1069
  if (popupOverlayColor) {
1070
  jQuery("#sgcboxOverlay").css({'background': 'none', 'background-color': popupOverlayColor});
1071
  }
 
 
 
1072
 
1073
- jQuery('#sgcolorbox').trigger("sgColorboxOnOpen", []);
1074
 
1075
  },
1076
  onLoad: function () {
312
  var contentBackgroundColor = popupData['sg-content-background-color'];
313
  var changedColor = popupContentColor.replace(')', ', '+popupContentOpacity+')').replace('rgb', 'rgba');
314
 
315
+ if(typeof contentBackgroundColor != 'undefined' && contentBackgroundColor != '') {
316
  changedColor = this.hexToRgba(contentBackgroundColor, popupContentOpacity);
317
  }
318
 
766
  var popupId = this.popupData['id'];
767
  var popupContentWrapper = jQuery('#sg-popup-content-wrapper-'+popupId);
768
 
769
+ if(!popupContentWrapper.length || typeof this.popupData['htmlIframeUrl'] == 'undefined') {
770
  return;
771
  }
772
 
784
  return;
785
  };
786
 
787
+ SGPopup.prototype.getSearchDataFromContent = function(content)
788
+ {
789
+ var pattern = /\[(\[?)(pbvariable)(?![\w-])([^\]\/]*(?:\/(?!\])[^\]\/]*)*?)(?:(\/)\]|\](?:([^\[]\*+(?:\[(?!\/\2\])[^\[]\*+)\*+)\[\/\2\])?)(\]?)/gi;
790
+ var match;
791
+ var collectedData = [];
792
+
793
+ while (match = pattern.exec(content)) {
794
+ var currentSearchData = [];
795
+ currentSearchData['replaceString'] = match[0];
796
+ var parseAttributes = /\s(\w+?)="(.+?)"/g;
797
+ var attributes;
798
+ var attributesKeyValue = [];
799
+ while (attributes = parseAttributes.exec(match[3])) {
800
+ attributesKeyValue[attributes[1]] = attributes[2];
801
+ }
802
+ currentSearchData['searchData'] = attributesKeyValue;
803
+ collectedData.push(currentSearchData);
804
+ }
805
+
806
+ return collectedData;
807
+ };
808
+
809
+ SGPopup.prototype.replaceWithCustomShortcode = function(popupId) {
810
+ var currentHtmlContent = jQuery('#sg-popup-content-wrapper-'+popupId).html();
811
+ var searchData = this.getSearchDataFromContent(currentHtmlContent);
812
+
813
+ if (searchData) {
814
+ for (var index in searchData) {
815
+ var currentSearchData = searchData[index];
816
+ var currentsearchData = currentSearchData['searchData'];
817
+
818
+ if (typeof currentsearchData['selector'] == 'undefined' || typeof currentsearchData['attribute'] == 'undefined') {
819
+ currentHtmlContent = currentHtmlContent.replace(currentSearchData['replaceString'], '');
820
+ continue;
821
+ }
822
+
823
+ try {
824
+ if (!jQuery(currentsearchData['selector']).length) {
825
+ currentHtmlContent = currentHtmlContent.replace(currentSearchData['replaceString'], '');
826
+ continue;
827
+ }
828
+ }
829
+ catch (e) {
830
+ currentHtmlContent = currentHtmlContent.replace(currentSearchData['replaceString'], '');
831
+ continue;
832
+ }
833
 
834
+ var replaceName = jQuery(currentsearchData['selector']).attr(currentsearchData['attribute']);
835
+
836
+ if (typeof replaceName == 'undefined') {
837
+ currentHtmlContent = currentHtmlContent.replace(currentSearchData['replaceString'], '');
838
+ continue;
839
+ }
840
+
841
+ currentHtmlContent = currentHtmlContent.replace(currentSearchData['replaceString'], replaceName);
842
+ }
843
+ }
844
+ jQuery('#sg-popup-content-wrapper-'+popupId).html(currentHtmlContent);
845
+ };
846
+
847
+ SGPopup.prototype.colorboxEventsListener = function ()
848
+ {
849
  var that = this;
850
  var disablePageScrolling = this.varToBool(this.popupData['disable-page-scrolling']);
851
  var popupOpenSound = this.varToBool(this.popupData['popupOpenSound']);
864
  if(popupOpenSound && popupOpenSoundFile && typeof that.audio == 'undefined') {
865
  that.audio = new Audio(popupOpenSoundFile);
866
  }
867
+ jQuery('#sgcolorbox').on("sgColorboxOnOpen", function (e, args) {
868
+ var popupId = args.popupId;
869
+ that.replaceWithCustomShortcode(popupId);
870
  if(disablePageScrolling) {
871
  jQuery('body').addClass('sgpb-disable-page-scrolling');
872
  }
941
  that.htmlIframeFilterForOpen('close');
942
  }
943
  });
 
944
  };
945
 
946
  SGPopup.prototype.sgShowColorboxWithOptions = function () {
1130
  if (popupOverlayColor) {
1131
  jQuery("#sgcboxOverlay").css({'background': 'none', 'background-color': popupOverlayColor});
1132
  }
1133
+ var openArgs = {
1134
+ popupId: popupId
1135
+ };
1136
 
1137
+ jQuery('#sgcolorbox').trigger("sgColorboxOnOpen", openArgs);
1138
 
1139
  },
1140
  onLoad: function () {
javascript/sgpbDiscountDays.js DELETED
@@ -1,32 +0,0 @@
1
- function sgpbDiscountDays() {
2
-
3
- }
4
-
5
- sgpbDiscountDays.prototype.init = function()
6
- {
7
- if (!jQuery('.sg-dont-show-again-day11').length) {
8
- return false;
9
- }
10
- var that = this;
11
-
12
- jQuery('.sg-dont-show-again-day11').bind('click', function() {
13
- jQuery('.sg-info-panel-wrapper-day11').remove();
14
- var nonce = jQuery(this).attr('data-ajaxnonce');
15
- var discountDay = jQuery(this).attr('data-discount');
16
-
17
- var data = {
18
- action: 'discountDays',
19
- discountDay: discountDay,
20
- nonce: nonce
21
- };
22
-
23
- jQuery.post(ajaxurl, data, function(responce) {
24
-
25
- });
26
- });
27
- };
28
-
29
- jQuery(document).ready(function() {
30
- var obj = new sgpbDiscountDays();
31
- obj.init();
32
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popup-builder.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /**
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.6
7
  * Author: Sygnoos
8
- * Author URI: http://www.sygnoos.com
9
  * License: GPLv2
10
  */
11
 
1
  <?php
2
  /**
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
7
  * Author: Sygnoos
8
+ * Author URI: https://sygnoos.com
9
  * License: GPLv2
10
  */
11
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Author: Popup Builder
5
  Donate link: https://popup-builder.com
6
  Tags: popup, pop up, wordpress popup, popup maker, exit popup
7
  Requires at least: 3.8
8
- Tested up to: 4.9
9
  Requires PHP: 5.3.3
10
  Stable tag: trunk
11
  License: GPLv2 or later
@@ -169,6 +169,11 @@ Go to the Popup Builder settings and set your desired options.
169
 
170
  == Changelog ==
171
 
 
 
 
 
 
172
  = Version 2.6.5 =
173
  * Bug fixed connected to Iframe video autoplay.
174
 
@@ -746,7 +751,7 @@ Leave us a good review :)
746
 
747
  == Upgrade Notice ==
748
 
749
- Current Version of Popup Builder is 2.6.6
750
 
751
  == Other Notes ==
752
 
5
  Donate link: https://popup-builder.com
6
  Tags: popup, pop up, wordpress popup, popup maker, exit popup
7
  Requires at least: 3.8
8
+ Tested up to: 4.9.1
9
  Requires PHP: 5.3.3
10
  Stable tag: trunk
11
  License: GPLv2 or later
169
 
170
  == Changelog ==
171
 
172
+ = Version 2.6.7 =
173
+ * Added new feature to use custom JS variables inside the popup.
174
+ * Content background issue fixed.
175
+ * Bug fixes and code optimization.
176
+
177
  = Version 2.6.5 =
178
  * Bug fixed connected to Iframe video autoplay.
179
 
751
 
752
  == Upgrade Notice ==
753
 
754
+ Current Version of Popup Builder is 2.6.7
755
 
756
  == Other Notes ==
757
 
style/blackFriday.css DELETED
@@ -1,225 +0,0 @@
1
- @font-face {
2
- font-family: "good times";
3
- src: url("fonts/good-times.ttf") format("truetype");
4
- }
5
- /* */
6
- .sg-info-panel-black-friday {
7
- margin: 5px auto !important;
8
- background-image: url('../img/pattern.jpg');
9
- background-repeat: repeat-x;
10
- background-size: 25% 100%;
11
- }
12
-
13
- .sg-discount-info-wrapper {
14
- color: red;
15
- font-size: 80px;
16
- font-weight: bold;
17
- transform: scale(1.3, 1.3);
18
- }
19
-
20
- .sg-discount-info-wrapper:hover {
21
- transform: rotate(20deg);
22
- transition-duration: 1s;
23
- }
24
- /* */
25
- .sg-info-text,
26
- .sg-info-text-center {
27
- text-align: center
28
- }
29
- .sg-info-panel-wrapper {
30
- position: relative;
31
- width: 100%;
32
- background-color: #181a1e;
33
- color: #fff;
34
- padding-bottom: 10px;
35
- padding-top: 5px;
36
- line-height: 1.231;
37
- }
38
- .sg-info-panel-wrapper .dashicons {
39
- line-height: 1.231;
40
- margin-left: 10px;
41
- margin-right: 10px
42
- }
43
- .sg-info-panel-wrapper:after {
44
- content: "";
45
- display: table;
46
- clear: both
47
- }
48
- .sg-info-panel-row {
49
- width: 100%
50
- }
51
- .sg-info-panel-row [class*=sg-info-panel-col]:first-child {
52
- margin-left: 3%
53
- }
54
- .sg-info-panel-col-3 {
55
- display: block;
56
- float: left;
57
- width: 30%;
58
- min-height: 30px;
59
- margin-left: 2%;
60
- -webkit-box-sizing: border-box;
61
- -moz-box-sizing: border-box;
62
- box-sizing: border-box
63
- }
64
- .sg-info-text {
65
- margin-top: 10px;
66
- margin-bottom: 10px;
67
- font-size: 20px
68
- }
69
- .sg-info-text-white {
70
- color: #fff
71
- }
72
- .sg-info-link,
73
- .sg-info-text-highlight {
74
- color: #30c2f3
75
- }
76
- .sg-info-link {
77
- font-style: italic
78
- }
79
- .sg-info-links {
80
- color: #30c2f3;
81
- text-decoration: none
82
- }
83
- .sg-info-logo {
84
- font-size: 35px;
85
- margin-bottom: 15px
86
- }
87
- .sg-info-upgrade-pro {
88
- position: relative;
89
- border: 1px solid #30c2f3;
90
- font-size: 30px;
91
- color: #fff;
92
- text-decoration: none;
93
- border-radius: 2px;
94
- display: inline-block;
95
- margin-top: 10px;
96
- text-align: center;
97
- padding: 10px 15px 10px 60px
98
- }
99
- .sg-info-upgrade-pro:before {
100
- content: '';
101
- display: block;
102
- position: absolute;
103
- width: 32px;
104
- height: 32px;
105
- content: url(../img/sg-shopping-cart-white.png);
106
- left: 10px;
107
- top: 50%;
108
- margin-top: -16px
109
- }
110
- .sg-info-upgrade-pro:hover {
111
- border-color: #fff;
112
- color: #30c2f3
113
- }
114
- .sg-info-upgrade-pro:hover:before {
115
- content: url(../img/sg-shopping-cart-blue.png);
116
- }
117
- .sg-info-menu {
118
- text-align: left;
119
- list-style-type: none
120
- }
121
- .sg-info-menu li {
122
- padding-bottom: 5px
123
- }
124
- .sg-info-blink {
125
- animation: sg-info-blinker 11s infinite;
126
- -webkit-animation: sg-info-blinker 11s infinite
127
- }
128
- .sg-info-close {
129
- float: right;
130
- color: #fff;
131
- position: absolute;
132
- right: 11px;
133
- font-size: 30px;
134
- top: 3px;
135
- cursor: pointer;
136
- transform: rotate(45deg);
137
- margin: -3px -3px 0
138
- }
139
- .sg-dont-show-agin {
140
- position: absolute;
141
- bottom: 10px;
142
- right: 12px;
143
- cursor: pointer
144
- }
145
- .sg-social-headline {
146
- font-size: 30px;
147
- color: #fff;
148
- margin-top: 13px;
149
- margin-bottom: 25px;
150
- }
151
- .sg-social-icons-wrapper {
152
- width: 100%;
153
- text-align: center;
154
- }
155
- .sg-social-icon {
156
- width: 50px;
157
- height: 48px;
158
- box-sizing: border-box;
159
- display: inline-block;
160
- background-size: 150px 44px;
161
- background-repeat: no-repeat;
162
- background-image: url(../img/social-icons.png);
163
- }
164
- .sg-social-icons-wrapper .sg-social-icon:not(:first-child) {
165
- margin-left: 10px;
166
- }
167
-
168
- .social-icon-tw {
169
- background-position: -50px 0px;
170
- }
171
-
172
- .social-icon-gp {
173
- background-position: -100px 0px;
174
- }
175
- @keyframes sg-info-blinker {
176
- 0% {
177
- opacity: 0
178
- }
179
- 10%,
180
- 100% {
181
- opacity: 1
182
- }
183
- }
184
- @media (min-width: 992px) and (max-width: 1199px) {
185
- .sg-info-panel-wrapper .dashicons,
186
- .sg-info-text {
187
- font-size: 15px
188
- }
189
- .sg-info-logo,
190
- .sg-info-upgrade-pro {
191
- font-size: 25px
192
- }
193
- .sg-social-icon {
194
- margin: 0px;
195
- }
196
- }
197
- @media (min-width: 768px) and (max-width: 991px) {
198
- .sg-info-panel-wrapper .dashicons,
199
- .sg-info-text {
200
- font-size: 13px
201
- }
202
- }
203
- @media (max-width: 767px) {
204
- .sg-info-panel-wrapper .dashicons,
205
- .sg-info-text {
206
- font-size: 12px
207
- }
208
- .sg-info-logo,
209
- .sg-info-upgrade-pro {
210
- font-size: 18px
211
- }
212
- }
213
- @media (max-width: 480px) {
214
- .sg-info-panel-col-3 {
215
- width: 45%
216
- }
217
- .sg-info-panel-wrapper .dashicons,
218
- .sg-info-text {
219
- font-size: 10px
220
- }
221
- .sg-info-logo,
222
- .sg-info-upgrade-pro {
223
- font-size: 15px
224
- }
225
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
style/discountDay11.css DELETED
@@ -1,28 +0,0 @@
1
- .sg-info-panel-wrapper-day11 {
2
- height: 175px;
3
- position: relative;
4
- width: 100%;
5
- background-image: url('../img/day11Bg.jpg');
6
- background-repeat: no-repeat;
7
- background-size: 100% 100%;
8
- color: #fff;
9
- padding-bottom: 10px;
10
- padding-top: 5px;
11
- line-height: 1.231;
12
- cursor: pointer;
13
- margin-bottom: 10px;
14
- }
15
-
16
- .sg-dont-show-again-day11 {
17
- position: absolute;
18
- bottom: 10px;
19
- right: 12px;
20
- cursor: pointer
21
- }
22
-
23
- .sgpb-visit-web-site-day11 {
24
- position: absolute;
25
- bottom: 30px;
26
- right: 15px !important;
27
- cursor: pointer
28
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
style/newYear.css ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .sg-info-panel-new-year {
2
+ width: 100%;
3
+ max-width: 1920px;
4
+ height: 220px;
5
+ margin: 5px auto;
6
+ background-size: cover;
7
+ background-image: url('../img/newYearBg.jpg');
8
+ box-sizing: border-box;
9
+ padding-top: 9px;
10
+ position: relative;
11
+ background-position: right;
12
+ background-position-y: 99%;
13
+ }
14
+
15
+ .sg-new-year-text-wrapper {
16
+ margin: 0px auto;
17
+ width: 80%;
18
+ text-align: center;
19
+ }
20
+
21
+ .sg-new-year-text-wrapper p {
22
+ color: white;
23
+ font-size: 28px;
24
+ font-weight: 900;
25
+ margin-top: 1px;
26
+ margin-bottom: 1px;
27
+ }
28
+
29
+ .sgpb-happy-button {
30
+ border: 1px solid white;
31
+ color: white;
32
+ background-color: red;
33
+ font-size: 25px;
34
+ }
35
+
36
+ .sgpb-happy-button:hover {
37
+ color: red;
38
+ background-color: white;
39
+ cursor: pointer;
40
+ }
41
+
42
+ .sgpb-new-year-dont-show {
43
+ position: absolute;
44
+ left: 8px;
45
+ bottom: 10px;
46
+ font-size: 21px;
47
+ font-weight: bold;
48
+ cursor: pointer;
49
+ color: #fff;
50
+ text-shadow: 2px 2px 2px #000;
51
+ }
52
+
53
+ @media(max-width: 600px) {
54
+ .sg-new-year-text-wrapper p {
55
+ font-size: 22px;
56
+ line-height: 30px;
57
+ }
58
+ }
59
+
60
+ @media(max-width: 400px) {
61
+ .sg-new-year-text-wrapper p {
62
+ font-size: 19px;
63
+ line-height: 20px;
64
+ }
65
+ }