Popup Builder – Responsive WordPress Pop up - Version 3.45

Version Description

Current Version of Popup Builder is 3.45

Download this release

Release Info

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

Code changes from version 3.44 to 3.45

com/classes/PopupLoader.php CHANGED
@@ -132,7 +132,7 @@ class PopupLoader
132
  $popupBuilderPosts->next_post();
133
  $popupPost = $popupBuilderPosts->post;
134
  $popup = SGPopup::find($popupPost);
135
- if (empty($popup)) {
136
  continue;
137
  }
138
  if ($popup->allowToLoad() || (is_preview() && get_post_type() == SG_POPUP_POST_TYPE)) {
132
  $popupBuilderPosts->next_post();
133
  $popupPost = $popupBuilderPosts->post;
134
  $popup = SGPopup::find($popupPost);
135
+ if (empty($popup) || !is_object($popup)) {
136
  continue;
137
  }
138
  if ($popup->allowToLoad() || (is_preview() && get_post_type() == SG_POPUP_POST_TYPE)) {
com/classes/popups/ImagePopup.php CHANGED
@@ -38,6 +38,7 @@ class ImagePopup extends SGPopup
38
 
39
  public function getRemoveOptions()
40
  {
 
41
  // Where 1 mean this options must not show for this popup type
42
  $removeOptions = array(
43
  'sgpb-reopen-after-form-submission' => 1,
@@ -47,6 +48,9 @@ class ImagePopup extends SGPopup
47
  'sgpb-content-padding' => 1
48
  );
49
  $parentOptions = parent::getRemoveOptions();
 
 
 
50
 
51
  return $removeOptions + $parentOptions;
52
  }
38
 
39
  public function getRemoveOptions()
40
  {
41
+
42
  // Where 1 mean this options must not show for this popup type
43
  $removeOptions = array(
44
  'sgpb-reopen-after-form-submission' => 1,
48
  'sgpb-content-padding' => 1
49
  );
50
  $parentOptions = parent::getRemoveOptions();
51
+ if ($this->getType() != 'image') {
52
+ return $parentOptions;
53
+ }
54
 
55
  return $removeOptions + $parentOptions;
56
  }
com/classes/popups/SGPopup.php CHANGED
@@ -272,7 +272,10 @@ abstract class SGPopup
272
  return false;
273
  }
274
 
275
- $type = @$savedData['sgpb-type'];
 
 
 
276
 
277
  $popupClassName = self::getPopupClassNameFormType($type);
278
  $typePath = self::getPopupTypeClassPath($type);
272
  return false;
273
  }
274
 
275
+ $type = 'html';
276
+ if (isset($savedData['sgpb-type'])) {
277
+ $type = $savedData['sgpb-type'];
278
+ }
279
 
280
  $popupClassName = self::getPopupClassNameFormType($type);
281
  $typePath = self::getPopupTypeClassPath($type);
com/classes/popups/SubscriptionPopup.php CHANGED
@@ -193,52 +193,52 @@ class SubscriptionPopup extends SGPopup
193
  $formData = array();
194
  $inputStyles = array();
195
  $submitStyles = array();
196
- $emailPlaceholder = $this->getOptionValue('sgpb-subs-email-placeholder');
197
- if ($this->getOptionValue('sgpb-subs-text-width')) {
198
- $inputWidth = $this->getOptionValue('sgpb-subs-text-width');
199
  $inputStyles['width'] = AdminHelper::getCSSSafeSize($inputWidth);
200
  }
201
- if ($this->getOptionValue('sgpb-subs-text-height')) {
202
- $inputHeight = $this->getOptionValue('sgpb-subs-text-height');
203
  $inputStyles['height'] = AdminHelper::getCSSSafeSize($inputHeight);
204
  }
205
- if ($this->getOptionValue('sgpb-subs-text-border-width')) {
206
- $inputBorderWidth = $this->getOptionValue('sgpb-subs-text-border-width');
207
  $inputStyles['border-width'] = AdminHelper::getCSSSafeSize($inputBorderWidth);
208
  }
209
- if ($this->getOptionValue('sgpb-subs-text-border-color')) {
210
- $inputStyles['border-color'] = $this->getOptionValue('sgpb-subs-text-border-color');
211
  }
212
- if ($this->getOptionValue('sgpb-subs-text-bg-color')) {
213
- $inputStyles['background-color'] = $this->getOptionValue('sgpb-subs-text-bg-color');
214
  }
215
- if ($this->getOptionValue('sgpb-subs-text-color')) {
216
- $inputStyles['color'] = $this->getOptionValue('sgpb-subs-text-color');
217
  }
218
  $inputStyles['autocomplete'] = 'off';
219
 
220
- if ($this->getOptionValue('sgpb-subs-btn-width')) {
221
- $submitWidth = $this->getOptionValue('sgpb-subs-btn-width');
222
  $submitStyles['width'] = AdminHelper::getCSSSafeSize($submitWidth);
223
  }
224
- if ($this->getOptionValue('sgpb-subs-btn-height')) {
225
- $submitHeight = $this->getOptionValue('sgpb-subs-btn-height');
226
  $submitStyles['height'] = AdminHelper::getCSSSafeSize($submitHeight);
227
  }
228
- if ($this->getOptionValue('sgpb-subs-btn-bg-color')) {
229
- $submitStyles['background-color'] = $this->getOptionValue('sgpb-subs-btn-bg-color');
230
  }
231
- if ($this->getOptionValue('sgpb-subs-btn-text-color')) {
232
- $submitStyles['color'] = $this->getOptionValue('sgpb-subs-btn-text-color');
233
  }
234
- if ($this->getOptionValue('sgpb-subs-btn-border-radius')) {
235
- $submitStyles['border-radius'] = AdminHelper::getCSSSafeSize($this->getOptionValue('sgpb-subs-btn-border-radius'));
236
  }
237
- if ($this->getOptionValue('sgpb-subs-btn-border-width')) {
238
- $submitStyles['border-width'] = AdminHelper::getCSSSafeSize($this->getOptionValue('sgpb-subs-btn-border-width'));
239
  }
240
- if ($this->getOptionValue('sgpb-subs-btn-border-color')) {
241
- $submitStyles['border-color'] = $this->getOptionValue('sgpb-subs-btn-border-color');
242
  }
243
  $submitStyles['text-transform'] = 'none !important';
244
  $submitStyles['border-style'] = 'solid';
@@ -257,10 +257,10 @@ class SubscriptionPopup extends SGPopup
257
  'errorMessageBoxStyles' => $inputStyles['width']
258
  );
259
 
260
- $firstNamePlaceholder = $this->getOptionValue('sgpb-subs-first-placeholder');
261
  $firstNameRequired = $this->getOptionValueFromSavedData('sgpb-subs-first-name-required');
262
  $firstNameRequired = (!empty($firstNameRequired)) ? true : false;
263
- $isShow = ($this->getOptionValue('sgpb-subs-first-name-status')) ? true : false;
264
 
265
  $formData['first-name'] = array(
266
  'isShow' => $isShow,
@@ -276,10 +276,10 @@ class SubscriptionPopup extends SGPopup
276
  'errorMessageBoxStyles' => $inputStyles['width']
277
  );
278
 
279
- $lastNamePlaceholder = $this->getOptionValue('sgpb-subs-last-placeholder');
280
  $lastNameRequired = $this->getOptionValueFromSavedData('sgpb-subs-last-name-required');
281
  $lastNameRequired = (!empty($lastNameRequired)) ? true : false;
282
- $isShow = ($this->getOptionValue('sgpb-subs-last-name-status')) ? true : false;
283
 
284
  $formData['last-name'] = array(
285
  'isShow' => $isShow,
@@ -312,7 +312,7 @@ class SubscriptionPopup extends SGPopup
312
  ),
313
  'style' => array('width' => $inputWidth),
314
  'label' => $gdprLabel,
315
- 'text' => $this->getOptionValue('sgpb-subs-gdpr-text'),
316
  'errorMessageBoxStyles' => $inputStyles['width']
317
  );
318
  /* GDPR checkbox */
@@ -333,8 +333,8 @@ class SubscriptionPopup extends SGPopup
333
  'style' => $hiddenChecker
334
  );
335
 
336
- $submitTitle = $this->getOptionValue('sgpb-subs-btn-title');
337
- $progressTitle = $this->getOptionValue('sgpb-subs-btn-progress-title');
338
  $formData['submit'] = array(
339
  'isShow' => true,
340
  'attrs' => array(
@@ -567,8 +567,9 @@ class SubscriptionPopup extends SGPopup
567
  $popupContent = '';
568
  $popupOptions = $popupObj->getOptions();
569
  $subsFields = $popupObj->getOptionValue('sgpb-subs-fields');
 
570
 
571
- if (empty($subsFields)) {
572
  $subsFields = $popupObj->createFormFieldsData();
573
  }
574
 
193
  $formData = array();
194
  $inputStyles = array();
195
  $submitStyles = array();
196
+ $emailPlaceholder = $this->getFieldValue('sgpb-subs-email-placeholder');
197
+ if ($this->getFieldValue('sgpb-subs-text-width')) {
198
+ $inputWidth = $this->getFieldValue('sgpb-subs-text-width');
199
  $inputStyles['width'] = AdminHelper::getCSSSafeSize($inputWidth);
200
  }
201
+ if ($this->getFieldValue('sgpb-subs-text-height')) {
202
+ $inputHeight = $this->getFieldValue('sgpb-subs-text-height');
203
  $inputStyles['height'] = AdminHelper::getCSSSafeSize($inputHeight);
204
  }
205
+ if ($this->getFieldValue('sgpb-subs-text-border-width')) {
206
+ $inputBorderWidth = $this->getFieldValue('sgpb-subs-text-border-width');
207
  $inputStyles['border-width'] = AdminHelper::getCSSSafeSize($inputBorderWidth);
208
  }
209
+ if ($this->getFieldValue('sgpb-subs-text-border-color')) {
210
+ $inputStyles['border-color'] = $this->getFieldValue('sgpb-subs-text-border-color');
211
  }
212
+ if ($this->getFieldValue('sgpb-subs-text-bg-color')) {
213
+ $inputStyles['background-color'] = $this->getFieldValue('sgpb-subs-text-bg-color');
214
  }
215
+ if ($this->getFieldValue('sgpb-subs-text-color')) {
216
+ $inputStyles['color'] = $this->getFieldValue('sgpb-subs-text-color');
217
  }
218
  $inputStyles['autocomplete'] = 'off';
219
 
220
+ if ($this->getFieldValue('sgpb-subs-btn-width')) {
221
+ $submitWidth = $this->getFieldValue('sgpb-subs-btn-width');
222
  $submitStyles['width'] = AdminHelper::getCSSSafeSize($submitWidth);
223
  }
224
+ if ($this->getFieldValue('sgpb-subs-btn-height')) {
225
+ $submitHeight = $this->getFieldValue('sgpb-subs-btn-height');
226
  $submitStyles['height'] = AdminHelper::getCSSSafeSize($submitHeight);
227
  }
228
+ if ($this->getFieldValue('sgpb-subs-btn-bg-color')) {
229
+ $submitStyles['background-color'] = $this->getFieldValue('sgpb-subs-btn-bg-color');
230
  }
231
+ if ($this->getFieldValue('sgpb-subs-btn-text-color')) {
232
+ $submitStyles['color'] = $this->getFieldValue('sgpb-subs-btn-text-color');
233
  }
234
+ if ($this->getFieldValue('sgpb-subs-btn-border-radius')) {
235
+ $submitStyles['border-radius'] = AdminHelper::getCSSSafeSize($this->getFieldValue('sgpb-subs-btn-border-radius'));
236
  }
237
+ if ($this->getFieldValue('sgpb-subs-btn-border-width')) {
238
+ $submitStyles['border-width'] = AdminHelper::getCSSSafeSize($this->getFieldValue('sgpb-subs-btn-border-width'));
239
  }
240
+ if ($this->getFieldValue('sgpb-subs-btn-border-color')) {
241
+ $submitStyles['border-color'] = $this->getFieldValue('sgpb-subs-btn-border-color');
242
  }
243
  $submitStyles['text-transform'] = 'none !important';
244
  $submitStyles['border-style'] = 'solid';
257
  'errorMessageBoxStyles' => $inputStyles['width']
258
  );
259
 
260
+ $firstNamePlaceholder = $this->getFieldValue('sgpb-subs-first-placeholder');
261
  $firstNameRequired = $this->getOptionValueFromSavedData('sgpb-subs-first-name-required');
262
  $firstNameRequired = (!empty($firstNameRequired)) ? true : false;
263
+ $isShow = ($this->getFieldValue('sgpb-subs-first-name-status')) ? true : false;
264
 
265
  $formData['first-name'] = array(
266
  'isShow' => $isShow,
276
  'errorMessageBoxStyles' => $inputStyles['width']
277
  );
278
 
279
+ $lastNamePlaceholder = $this->getFieldValue('sgpb-subs-last-placeholder');
280
  $lastNameRequired = $this->getOptionValueFromSavedData('sgpb-subs-last-name-required');
281
  $lastNameRequired = (!empty($lastNameRequired)) ? true : false;
282
+ $isShow = ($this->getFieldValue('sgpb-subs-last-name-status')) ? true : false;
283
 
284
  $formData['last-name'] = array(
285
  'isShow' => $isShow,
312
  ),
313
  'style' => array('width' => $inputWidth),
314
  'label' => $gdprLabel,
315
+ 'text' => $this->getFieldValue('sgpb-subs-gdpr-text'),
316
  'errorMessageBoxStyles' => $inputStyles['width']
317
  );
318
  /* GDPR checkbox */
333
  'style' => $hiddenChecker
334
  );
335
 
336
+ $submitTitle = $this->getFieldValue('sgpb-subs-btn-title');
337
+ $progressTitle = $this->getFieldValue('sgpb-subs-btn-progress-title');
338
  $formData['submit'] = array(
339
  'isShow' => true,
340
  'attrs' => array(
567
  $popupContent = '';
568
  $popupOptions = $popupObj->getOptions();
569
  $subsFields = $popupObj->getOptionValue('sgpb-subs-fields');
570
+ $isSubscriptionPlusActive = is_plugin_active(SGPB_POPUP_SUBSCRIPTION_PLUS_EXTENSION_KEY);
571
 
572
+ if (empty($subsFields) || !$isSubscriptionPlusActive) {
573
  $subsFields = $popupObj->createFormFieldsData();
574
  }
575
 
com/config/config.php CHANGED
@@ -20,7 +20,7 @@ class SgpbPopupConfig
20
  self::addDefine('SG_POPUP_PRO_URL', 'https://popup-builder.com/#prices');
21
  self::addDefine('SG_POPUP_EXTENSIONS_URL', 'https://popup-builder.com/#extensions');
22
  self::addDefine('SG_POPUP_SUPPORT_URL', 'https://wordpress.org/support/plugin/popup-builder');
23
- self::addDefine('SG_POPUP_TICKET_URL', 'https://sygnoos.ladesk.com/submit_ticket');
24
  self::addDefine('SG_POPUP_RATE_US_URL', 'https://wordpress.org/support/plugin/popup-builder/reviews/?filter=5');
25
  self::addDefine('SG_POPUP_IFRAME_URL', 'https://popup-builder.com/downloads/iframe/');
26
  self::addDefine('SG_POPUP_SCROLL_URL', 'https://popup-builder.com/downloads/scroll/');
20
  self::addDefine('SG_POPUP_PRO_URL', 'https://popup-builder.com/#prices');
21
  self::addDefine('SG_POPUP_EXTENSIONS_URL', 'https://popup-builder.com/#extensions');
22
  self::addDefine('SG_POPUP_SUPPORT_URL', 'https://wordpress.org/support/plugin/popup-builder');
23
+ self::addDefine('SG_POPUP_TICKET_URL', 'https://help.popup-builder.com');
24
  self::addDefine('SG_POPUP_RATE_US_URL', 'https://wordpress.org/support/plugin/popup-builder/reviews/?filter=5');
25
  self::addDefine('SG_POPUP_IFRAME_URL', 'https://popup-builder.com/downloads/iframe/');
26
  self::addDefine('SG_POPUP_SCROLL_URL', 'https://popup-builder.com/downloads/scroll/');
com/config/configPackage.php CHANGED
@@ -3,6 +3,6 @@ if (!defined('ABSPATH')) {
3
  exit();
4
  }
5
 
6
- define('SG_POPUP_VERSION', '3.44');
7
  define('SGPB_POPUP_PKG', SGPB_POPUP_PKG_FREE);
8
  define('POPUP_BUILDER_BASENAME', 'popupbuilder-platinum/popup-builder.php');
3
  exit();
4
  }
5
 
6
+ define('SG_POPUP_VERSION', '3.45');
7
  define('SGPB_POPUP_PKG', SGPB_POPUP_PKG_FREE);
8
  define('POPUP_BUILDER_BASENAME', 'popupbuilder-platinum/popup-builder.php');
com/helpers/Functions.php CHANGED
@@ -77,7 +77,7 @@ class Functions
77
  }
78
  }
79
 
80
- if (!isset($formField['isShow'])) {
81
  $hideClassName = 'sg-js-hide';
82
  }
83
 
77
  }
78
  }
79
 
80
+ if (isset($formField['isShow']) && !$formField['isShow']) {
81
  $hideClassName = 'sg-js-hide';
82
  }
83
 
com/libs/Table.php CHANGED
@@ -106,8 +106,8 @@ class SGPBTable extends SGPBListTable
106
 
107
  $totalPages = ceil($totalItems/$perPage);
108
 
109
- $orderby = isset($_GET['orderby']) ? sanitize_text_field($_GET['orderby']) : 'ASC';
110
- $order = isset($_GET['order']) ? sanitize_text_field($_GET['order']) : '';
111
 
112
  if (isset($this->initialOrder) && empty($order)) {
113
  foreach ($this->initialOrder as $key => $value) {
@@ -211,11 +211,11 @@ class SGPBTable extends SGPBListTable
211
  if (!$isVisibleExtraNav) {
212
  return '';
213
  }
214
-
215
 
216
-
217
 
218
-
 
 
219
  ?>
220
  <div class="alignleft actions daterangeactions">
221
  <label class="screen-reader-text" for="sgpb-subscription-popup"><?php _e('Filter by popup', SG_POPUP_TEXT_DOMAIN)?></label>
@@ -223,7 +223,7 @@ class SGPBTable extends SGPBListTable
223
 
224
  <label class="screen-reader-text" for="sgpb-subscribers-dates"><?php _e('Filter by date', SG_POPUP_TEXT_DOMAIN)?></label>
225
  <?php echo $this->getNavDateConditions(); ?>
226
-
227
  <input name="filter_action" id="post-query-submit" class="button" value="<?php _e('Filter', SG_POPUP_TEXT_DOMAIN)?>" type="submit">
228
  </div>
229
  <?php
106
 
107
  $totalPages = ceil($totalItems/$perPage);
108
 
109
+ $orderby = isset($_GET['orderby']) ? sanitize_sql_orderby($_GET['orderby']) : 'ASC';
110
+ $order = isset($_GET['order']) ? sanitize_sql_orderby($_GET['order']) : '';
111
 
112
  if (isset($this->initialOrder) && empty($order)) {
113
  foreach ($this->initialOrder as $key => $value) {
211
  if (!$isVisibleExtraNav) {
212
  return '';
213
  }
 
214
 
 
215
 
216
+
217
+
218
+
219
  ?>
220
  <div class="alignleft actions daterangeactions">
221
  <label class="screen-reader-text" for="sgpb-subscription-popup"><?php _e('Filter by popup', SG_POPUP_TEXT_DOMAIN)?></label>
223
 
224
  <label class="screen-reader-text" for="sgpb-subscribers-dates"><?php _e('Filter by date', SG_POPUP_TEXT_DOMAIN)?></label>
225
  <?php echo $this->getNavDateConditions(); ?>
226
+
227
  <input name="filter_action" id="post-query-submit" class="button" value="<?php _e('Filter', SG_POPUP_TEXT_DOMAIN)?>" type="submit">
228
  </div>
229
  <?php
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: 3.44
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: 3.45
7
  * Author: Sygnoos
8
  * Author URI: https://sygnoos.com
9
  * License: GPLv2
public/js/PopupBuilder.js CHANGED
@@ -2296,6 +2296,7 @@ SgpbEventListener.prototype.getPopupObj = function()
2296
  SgpbEventListener.eventsListenerAfterDocumentReady = function()
2297
  {
2298
  window.SGPB_SOUND = [];
 
2299
  sgAddEvent(window, 'sgpbDidOpen', function(e) {
2300
  SGPBPopup.playMusic(e);
2301
  });
2296
  SgpbEventListener.eventsListenerAfterDocumentReady = function()
2297
  {
2298
  window.SGPB_SOUND = [];
2299
+
2300
  sgAddEvent(window, 'sgpbDidOpen', function(e) {
2301
  SGPBPopup.playMusic(e);
2302
  });
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.44
13
  License: GPLv2 or later
14
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
15
 
@@ -185,6 +185,13 @@ Go to the Popup Builder settings and set your desired options.
185
 
186
  == Changelog ==
187
 
 
 
 
 
 
 
 
188
  = Version 3.44 =
189
  * Code optimization and typo fixes.
190
  * Bug fixed, related to Unsubscribe link in the newsletter.
@@ -1027,7 +1034,7 @@ Leave us a good review :)
1027
 
1028
  == Upgrade Notice ==
1029
 
1030
- Current Version of Popup Builder is 3.43
1031
 
1032
  == Other Notes ==
1033
 
9
  Requires at least: 3.8
10
  Tested up to: 5.3
11
  Requires PHP: 5.3.3
12
+ Stable tag: 3.45
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.45 =
189
+ * Improvements of subscription form live preview.
190
+ * Changed Support location URL to (Live Chat).
191
+ * Bug fixed related to Subscribers Table ordering (credit: Tin Duong of Fortinet’s FortiGuard Labs).
192
+ * Banner closing issue fixed.
193
+ * Code/speed improvements, php notices have been removed.
194
+
195
  = Version 3.44 =
196
  * Code optimization and typo fixes.
197
  * Bug fixed, related to Unsubscribe link in the newsletter.
1034
 
1035
  == Upgrade Notice ==
1036
 
1037
+ Current Version of Popup Builder is 3.45
1038
 
1039
  == Other Notes ==
1040