Popup Builder – Responsive WordPress Pop up - Version 3.2

Version Description

Current Version of Popup Builder is 3.2

Download this release

Release Info

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

Code changes from version 3.1.9 to 3.2

com/classes/Actions.php CHANGED
@@ -57,6 +57,7 @@ class Actions
57
  // activate extensions
58
  add_action('wp_before_admin_bar_render', array($this, 'pluginActivated'), 10, 2);
59
  add_action('admin_head', array($this, 'hidePageBuilderEditButtons'));
 
60
  add_action('admin_notices', array($this, 'inactiveExtensionNotice'));
61
  new Ajax();
62
  }
@@ -106,6 +107,21 @@ class Actions
106
  }
107
  }
108
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  public function hidePageBuilderEditButtons($postId = 0, $post = array())
110
  {
111
  $currentPostType = AdminHelper::getCurrentPostType();
@@ -143,6 +159,7 @@ class Actions
143
 
144
  public function wpInit()
145
  {
 
146
  if (!get_option('sgpb-banner-cron-only-once')) {
147
  update_option('sgpb-banner-cron-only-once', 1);
148
  wp_schedule_event(time(), 'daily', 'sgpbGetBannerContentOnce');
@@ -327,7 +344,13 @@ class Actions
327
  {
328
  if (!$this->mediaButton) {
329
  $this->mediaButton = true;
330
- echo new MediaButton();
 
 
 
 
 
 
331
  }
332
  }
333
 
@@ -336,6 +359,7 @@ class Actions
336
  if (empty($this->mediaButton)) {
337
  $this->mediaButton = true;
338
  add_action('admin_footer', function() {
 
339
  echo new MediaButton(false);
340
  });
341
  }
@@ -343,6 +367,23 @@ class Actions
343
  return $plugins;
344
  }
345
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
346
  public function userRolesCaps()
347
  {
348
  $userSavedRoles = get_option('sgpb-user-roles');
@@ -577,7 +618,7 @@ class Actions
577
  $headers = array(
578
  'From: "'.$blogInfo.'" <'.$fromEmail.'>' ,
579
  'MIME-Version: 1.0' ,
580
- 'Content-type: text/html; charset=iso-8859-1'
581
  );
582
 
583
  foreach ($subscribers as $subscriber) {
57
  // activate extensions
58
  add_action('wp_before_admin_bar_render', array($this, 'pluginActivated'), 10, 2);
59
  add_action('admin_head', array($this, 'hidePageBuilderEditButtons'));
60
+ add_action('admin_head', array($this, 'hidePublishingActions'));
61
  add_action('admin_notices', array($this, 'inactiveExtensionNotice'));
62
  new Ajax();
63
  }
107
  }
108
  }
109
 
110
+ public function hidePublishingActions() {
111
+ $currentPostType = AdminHelper::getCurrentPostType();
112
+ if (empty($currentPostType) || $currentPostType != SG_POPUP_POST_TYPE) {
113
+ return false;
114
+ }
115
+
116
+ echo '<style>
117
+ #misc-publishing-actions .edit-post-status,
118
+ #misc-publishing-actions .edit-timestamp,
119
+ #misc-publishing-actions .edit-visibility {
120
+ display:none !important;
121
+ }
122
+ </style>';
123
+ }
124
+
125
  public function hidePageBuilderEditButtons($postId = 0, $post = array())
126
  {
127
  $currentPostType = AdminHelper::getCurrentPostType();
159
 
160
  public function wpInit()
161
  {
162
+ require_once(ABSPATH.'wp-admin/includes/screen.php');
163
  if (!get_option('sgpb-banner-cron-only-once')) {
164
  update_option('sgpb-banner-cron-only-once', 1);
165
  wp_schedule_event(time(), 'daily', 'sgpbGetBannerContentOnce');
344
  {
345
  if (!$this->mediaButton) {
346
  $this->mediaButton = true;
347
+ self::enqueueScriptsForPageBuilders();
348
+ if (function_exists('get_current_screen')) {
349
+ $screen = get_current_screen();
350
+ if (!empty($screen)) {
351
+ echo new MediaButton();
352
+ }
353
+ }
354
  }
355
  }
356
 
359
  if (empty($this->mediaButton)) {
360
  $this->mediaButton = true;
361
  add_action('admin_footer', function() {
362
+ self::enqueueScriptsForPageBuilders();
363
  echo new MediaButton(false);
364
  });
365
  }
367
  return $plugins;
368
  }
369
 
370
+ public static function enqueueScriptsForPageBuilders()
371
+ {
372
+ require_once(ABSPATH.'wp-admin/includes/screen.php');
373
+ global $post;
374
+ if (function_exists('get_current_screen')) {
375
+ $screen = get_current_screen();
376
+ if ((!empty($screen->id) && $screen->id == SG_POPUP_POST_TYPE) || !empty($post)) {
377
+ Javascript::enqueueScripts('post-new.php');
378
+ Style::enqueueStyles('post-new.php');
379
+ }
380
+ }
381
+ else if (isset($_GET['fl_builder'])) {
382
+ Javascript::enqueueScripts('post-new.php');
383
+ Style::enqueueStyles('post-new.php');
384
+ }
385
+ }
386
+
387
  public function userRolesCaps()
388
  {
389
  $userSavedRoles = get_option('sgpb-user-roles');
618
  $headers = array(
619
  'From: "'.$blogInfo.'" <'.$fromEmail.'>' ,
620
  'MIME-Version: 1.0' ,
621
+ 'Content-type: text/html; charset=UTF-8'
622
  );
623
 
624
  foreach ($subscribers as $subscriber) {
com/classes/ConditionCreator.php CHANGED
@@ -150,11 +150,19 @@ class ConditionCreator
150
  $status = false;
151
  }
152
 
 
 
153
  if (is_array($operatorAllowInConditions)) {
 
154
  if (in_array($savedData['param'], $operatorAllowInConditions)) {
155
- $SGPB_DATA_CONFIG_ARRAY[$conditionName]['paramsData']['operator'] = $conditionData['paramsData'][$savedData['param'].'Operator'];
 
 
 
 
 
156
  }
157
- else if (!empty($savedData['tempParam']) && in_array($savedData['tempParam'], $operatorAllowInConditions)) {
158
  $SGPB_DATA_CONFIG_ARRAY[$conditionName]['paramsData']['operator'] = $conditionData['paramsData'][$savedData['tempParam'].'Operator'];
159
  }
160
  }
@@ -313,6 +321,10 @@ class ConditionCreator
313
  $data = $paramsData[$ruleName];
314
  }
315
 
 
 
 
 
316
 
317
  $optionAttr = array();
318
  if (!empty($attrs[$ruleName])) {
@@ -442,6 +454,9 @@ class ConditionCreator
442
  if (!empty($conditionAttrs[$titleKey])) {
443
  $optionAttrs = $conditionAttrs[$titleKey];
444
  if (!empty($optionAttrs['infoAttrs'])) {
 
 
 
445
  $optionTitle = $optionAttrs['infoAttrs']['label'];
446
  if (!empty($optionAttrs['infoAttrs']['labelAttrs'])) {
447
  $labelAttributes = AdminHelper::createAttrs($optionAttrs['infoAttrs']['labelAttrs']);
150
  $status = false;
151
  }
152
 
153
+ // unset old customOperator
154
+ $SGPB_DATA_CONFIG_ARRAY[$conditionName]['paramsData']['customOperator'] = '';
155
  if (is_array($operatorAllowInConditions)) {
156
+
157
  if (in_array($savedData['param'], $operatorAllowInConditions)) {
158
+ $operator = '';
159
+ if (!empty($conditionData['paramsData'][$savedData['param'].'Operator'])) {
160
+ $operator = $conditionData['paramsData'][$savedData['param'].'Operator'];
161
+ }
162
+ $SGPB_DATA_CONFIG_ARRAY[$conditionName]['paramsData']['customOperator'] = $operator;
163
+ return true;
164
  }
165
+ if (!empty($savedData['tempParam']) && in_array($savedData['tempParam'], $operatorAllowInConditions)) {
166
  $SGPB_DATA_CONFIG_ARRAY[$conditionName]['paramsData']['operator'] = $conditionData['paramsData'][$savedData['tempParam'].'Operator'];
167
  }
168
  }
321
  $data = $paramsData[$ruleName];
322
  }
323
 
324
+ // if exists customOperator it takes the custom one
325
+ if ($ruleName == 'operator' && !empty($paramsData['customOperator'])) {
326
+ $data = $paramsData['customOperator'];
327
+ }
328
 
329
  $optionAttr = array();
330
  if (!empty($attrs[$ruleName])) {
454
  if (!empty($conditionAttrs[$titleKey])) {
455
  $optionAttrs = $conditionAttrs[$titleKey];
456
  if (!empty($optionAttrs['infoAttrs'])) {
457
+ // $conditionName => events, conditions, targets...
458
+ // $ruleName => param, operator, value (1-st, 2-nd, 3-rd columns)
459
+ $optionAttrs = apply_filters('sgpb'.$conditionName.$ruleName.'Param', $optionAttrs, $saveData);
460
  $optionTitle = $optionAttrs['infoAttrs']['label'];
461
  if (!empty($optionAttrs['infoAttrs']['labelAttrs'])) {
462
  $labelAttributes = AdminHelper::createAttrs($optionAttrs['infoAttrs']['labelAttrs']);
com/classes/Filters.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
  namespace sgpb;
3
  use \SgpbPopupConfig;
 
4
 
5
  class Filters
6
  {
@@ -40,6 +41,17 @@ class Filters
40
  add_filter('sgpbAdditionalMetaboxes', array($this, 'metaboxes'), 10, 1);
41
  add_filter('sgpbOptionAvailable', array($this, 'filterOption'), 10, 1);
42
  add_filter('export_wp_filename', array($this, 'exportFileName'), 10, 1);
 
 
 
 
 
 
 
 
 
 
 
43
  }
44
 
45
  public function excludePostToShowPrepare()
1
  <?php
2
  namespace sgpb;
3
  use \SgpbPopupConfig;
4
+ use sgpb\PopupBuilderActivePackage;
5
 
6
  class Filters
7
  {
41
  add_filter('sgpbAdditionalMetaboxes', array($this, 'metaboxes'), 10, 1);
42
  add_filter('sgpbOptionAvailable', array($this, 'filterOption'), 10, 1);
43
  add_filter('export_wp_filename', array($this, 'exportFileName'), 10, 1);
44
+ add_filter('sgpbAdvancedOptionsDefaultValues', array($this, 'defaultAdvancedOptionsValues'), 10, 1);
45
+ }
46
+
47
+ public function defaultAdvancedOptionsValues($options = array())
48
+ {
49
+ $enablePopupOverlay = PopupBuilderActivePackage::canUseOption('sgpb-enable-popup-overlay');
50
+ if (!$enablePopupOverlay) {
51
+ $options['sgpb-enable-popup-overlay'] = 'on';
52
+ }
53
+
54
+ return $options;
55
  }
56
 
57
  public function excludePostToShowPrepare()
com/classes/MediaButton.php CHANGED
@@ -73,7 +73,7 @@ class MediaButton
73
  if (!$this->hideMediaButton) {
74
  $output = '';
75
  }
76
-
77
  return $output.$jsVariableContent;
78
  }
79
 
73
  if (!$this->hideMediaButton) {
74
  $output = '';
75
  }
76
+
77
  return $output.$jsVariableContent;
78
  }
79
 
com/classes/PopupChecker.php CHANGED
@@ -108,7 +108,14 @@ class PopupChecker
108
  if ($isPostInForbidden) {
109
  return $insertedModes;
110
  }
 
 
 
 
 
 
111
  $isPermissive = $this->isPermissive($target);
 
112
  //If permissive for current page check conditions
113
  if ($isPermissive) {
114
  $conditions = $this->divideConditionsData();
@@ -158,6 +165,7 @@ class PopupChecker
158
  if ($isPermissiveConditions) {
159
  return $isPermissiveConditions;
160
  }
 
161
  }
162
 
163
  return false;
@@ -464,17 +472,20 @@ class PopupChecker
464
  {
465
  $permissive = array();
466
  $forbidden = array();
467
-
 
 
 
468
  if (!empty($targetData)) {
469
  foreach ($targetData as $data) {
470
  if (empty($data['operator'])) {
471
  break;
472
  }
473
 
474
- if ($data['operator'] == '==') {
475
  $permissive[] = $data;
476
  }
477
- else {
478
  $forbidden[] = $data;
479
  }
480
  }
108
  if ($isPostInForbidden) {
109
  return $insertedModes;
110
  }
111
+
112
+ if (!empty($target['forbidden']) && empty($target['permissive'])) {
113
+ $insertedModes['option_event'] = true;
114
+ return $insertedModes;
115
+ }
116
+
117
  $isPermissive = $this->isPermissive($target);
118
+
119
  //If permissive for current page check conditions
120
  if ($isPermissive) {
121
  $conditions = $this->divideConditionsData();
165
  if ($isPermissiveConditions) {
166
  return $isPermissiveConditions;
167
  }
168
+
169
  }
170
 
171
  return false;
472
  {
473
  $permissive = array();
474
  $forbidden = array();
475
+ $permissiveOperators = array('==');
476
+ $forbiddenOperators = array('!=');
477
+ $permissiveOperators = apply_filters('sgpbAdditionalPermissiveOperators', $permissiveOperators);
478
+ $forbiddenOperators = apply_filters('sgpbAdditionalForbiddenOperators', $forbiddenOperators);
479
  if (!empty($targetData)) {
480
  foreach ($targetData as $data) {
481
  if (empty($data['operator'])) {
482
  break;
483
  }
484
 
485
+ if (in_array($data['operator'], $permissiveOperators)) {
486
  $permissive[] = $data;
487
  }
488
+ else if (in_array($data['operator'], $forbiddenOperators)) {
489
  $forbidden[] = $data;
490
  }
491
  }
com/classes/ScriptsLoader.php CHANGED
@@ -284,7 +284,7 @@ class ScriptsLoader
284
  if (!strpos($classPath, 'wp-content/plugins/')) {
285
  $classPath = SG_POPUP_PLUGIN_PATH.$classPath;
286
  }
287
-
288
  if (!file_exists($classPath)) {
289
  continue;
290
  }
284
  if (!strpos($classPath, 'wp-content/plugins/')) {
285
  $classPath = SG_POPUP_PLUGIN_PATH.$classPath;
286
  }
287
+
288
  if (!file_exists($classPath)) {
289
  continue;
290
  }
com/classes/popups/HtmlPopup.php CHANGED
@@ -23,9 +23,18 @@ class HtmlPopup extends SGPopup
23
  {
24
  $htmlContent = '';
25
  $popupContent = $this->getContent();
26
- $htmlContent .= '<div class="sgpb-main-html-content-wrapper">';
27
  $htmlContent .= $popupContent;
28
  $htmlContent .= '</div>';
 
 
 
 
 
 
 
 
 
29
  return $htmlContent;
30
  }
31
 
23
  {
24
  $htmlContent = '';
25
  $popupContent = $this->getContent();
26
+ $htmlContent .= '<div class="sgpb-scroll-wrapper sgpb-main-html-content-wrapper">';
27
  $htmlContent .= $popupContent;
28
  $htmlContent .= '</div>';
29
+
30
+ $htmlContent .= '<style>';
31
+ $htmlContent .= '.sgpb-popup-builder-content-html {';
32
+ $htmlContent .= 'width: 100%;';
33
+ $htmlContent .= 'height: 100%;';
34
+ $htmlContent .= 'overflow: auto;}';
35
+ $htmlContent .= '.sgpb-main-html-content-wrapper{overflow: auto !important;}';
36
+ $htmlContent .= '</style>';
37
+
38
  return $htmlContent;
39
  }
40
 
com/classes/popups/SGPopup.php CHANGED
@@ -425,7 +425,7 @@ abstract class SGPopup
425
  $obj->setSaveMode($saveMode);
426
  $additionalData = $obj->addAdditionalSettings($data, $obj);
427
  $data = array_merge($data, $additionalData);
428
-
429
  foreach ($data as $name => $value) {
430
  if (strpos($name, 'sgpb') === 0) {
431
  $defaultData = $obj->getDefaultDataByName($name);
@@ -1444,7 +1444,12 @@ abstract class SGPopup
1444
  continue;
1445
  }
1446
  if (isset($filters['type'])) {
1447
- if ($popup->getType() != $filters['type']) {
 
 
 
 
 
1448
  continue;
1449
  }
1450
  }
425
  $obj->setSaveMode($saveMode);
426
  $additionalData = $obj->addAdditionalSettings($data, $obj);
427
  $data = array_merge($data, $additionalData);
428
+ $data = apply_filters('sgpbAdvancedOptionsDefaultValues', $data);
429
  foreach ($data as $name => $value) {
430
  if (strpos($name, 'sgpb') === 0) {
431
  $defaultData = $obj->getDefaultDataByName($name);
1444
  continue;
1445
  }
1446
  if (isset($filters['type'])) {
1447
+ if (is_array($filters['type'])) {
1448
+ if (!in_array($popup->getType(), $filters['type'])) {
1449
+ continue;
1450
+ }
1451
+ }
1452
+ else if ($popup->getType() != $filters['type']) {
1453
  continue;
1454
  }
1455
  }
com/classes/popups/SubscriptionPopup.php CHANGED
@@ -232,10 +232,10 @@ class SubscriptionPopup extends SGPopup
232
  $submitStyles['color'] = $this->getFieldValue('sgpb-subs-btn-text-color');
233
  }
234
  if ($this->getFieldValue('sgpb-subs-btn-border-radius')) {
235
- $submitStyles['border-radius'] = $this->getFieldValue('sgpb-subs-btn-border-radius');
236
  }
237
  if ($this->getFieldValue('sgpb-subs-btn-border-width')) {
238
- $submitStyles['border-width'] = $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');
@@ -539,8 +539,13 @@ class SubscriptionPopup extends SGPopup
539
  apply_filters('sgpbSubscriptionForm', $this);
540
  $popupContent = $this->getContent();
541
  $formContent = $this->getFormContent();
 
 
542
 
543
- return $popupContent.$formContent;
 
 
 
544
  }
545
 
546
  public function subscriptionForm($popupObj)
@@ -625,7 +630,9 @@ class SubscriptionPopup extends SGPopup
625
  public static function getAllSubscriptions()
626
  {
627
  $popupArgs = array();
628
- $popupArgs['type'] = 'subscription';
 
 
629
  $allPopups = SGPopup::getAllPopups($popupArgs);
630
 
631
  return $allPopups;
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');
539
  apply_filters('sgpbSubscriptionForm', $this);
540
  $popupContent = $this->getContent();
541
  $formContent = $this->getFormContent();
542
+ $showToTop = $this->getOptionValue('sgpb-subs-show-form-to-top');
543
+ $content = $popupContent.$formContent;
544
 
545
+ if ($showToTop) {
546
+ $content = $formContent.$popupContent;
547
+ }
548
+ return $content;
549
  }
550
 
551
  public function subscriptionForm($popupObj)
630
  public static function getAllSubscriptions()
631
  {
632
  $popupArgs = array();
633
+ $popupArgs['type'][] = 'subscription';
634
+
635
+ $popupArgs = apply_filters('sgpbGetAllSubscriptionArgs', $popupArgs);
636
  $allPopups = SGPopup::getAllPopups($popupArgs);
637
 
638
  return $allPopups;
com/config/config.php CHANGED
@@ -48,6 +48,8 @@ class SgpbPopupConfig
48
  self::addDefine('SG_POPUP_SUBSCRIPTION_PLUS_URL', 'https://popup-builder.com/downloads/subscription-plus-popup/');
49
  self::addDefine('SG_POPUP_PUSH_NOTIFICATION_URL', 'https://popup-builder.com/downloads/web-push-notification-popup/');
50
  self::addDefine('SGPB_EDD_PLUGIN_URL', 'https://popup-builder.com/downloads/easy-digital-downloads-edd-popup/');
 
 
51
  self::addDefine('SG_POPUP_ADMIN_URL', admin_url());
52
  self::addDefine('SG_POPUP_BUILDER_URL', plugins_url().'/'.SG_POPUP_FOLDER_NAME.'/');
53
  self::addDefine('SG_POPUP_PLUGIN_PATH', WP_PLUGIN_DIR.'/');
48
  self::addDefine('SG_POPUP_SUBSCRIPTION_PLUS_URL', 'https://popup-builder.com/downloads/subscription-plus-popup/');
49
  self::addDefine('SG_POPUP_PUSH_NOTIFICATION_URL', 'https://popup-builder.com/downloads/web-push-notification-popup/');
50
  self::addDefine('SGPB_EDD_PLUGIN_URL', 'https://popup-builder.com/downloads/easy-digital-downloads-edd-popup/');
51
+ self::addDefine('SGPB_PDF_PLUGIN_URL', 'https://popup-builder.com/downloads/pdf-popup/');
52
+ self::addDefine('SGPB_GAMIFICATION_PLUGIN_URL', 'https://popup-builder.com/downloads/pick-a-gift-popup/');
53
  self::addDefine('SG_POPUP_ADMIN_URL', admin_url());
54
  self::addDefine('SG_POPUP_BUILDER_URL', plugins_url().'/'.SG_POPUP_FOLDER_NAME.'/');
55
  self::addDefine('SG_POPUP_PLUGIN_PATH', WP_PLUGIN_DIR.'/');
com/config/configPackage.php CHANGED
@@ -3,6 +3,6 @@ if (!defined('ABSPATH')) {
3
  exit();
4
  }
5
 
6
- define('SG_POPUP_VERSION', '3.1.9');
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.2');
7
  define('SGPB_POPUP_PKG', SGPB_POPUP_PKG_FREE);
8
  define('POPUP_BUILDER_BASENAME', 'popupbuilder-platinum/popup-builder.php');
com/config/dataConfig.php CHANGED
@@ -457,7 +457,7 @@ class SgpbDataConfig
457
  'data-select-type' => 'basic'
458
  ),
459
  'infoAttrs' => array(
460
- 'label' => 'Page operator',
461
  'info' => __('Allow or Disallow popup showing for the selected conditions.', SG_POPUP_TEXT_DOMAIN)
462
  )
463
  )
@@ -480,10 +480,31 @@ class SgpbDataConfig
480
  /*Target condition config*/
481
  }
482
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
483
  public static function allExtensionsKeys()
484
  {
485
  $keys = array();
486
 
 
 
 
 
 
 
487
  $keys[] = array(
488
  'label' => __('Push Notification', SG_POPUP_TEXT_DOMAIN),
489
  'pluginKey' => 'popupbuilder-push-notification/PopupBuilderPushNotification.php',
@@ -873,6 +894,7 @@ class SgpbDataConfig
873
  $options[] = array('name' => 'sgpb-subs-success-redirect-URL', 'type' => 'text', 'defaultValue' => '');
874
  $options[] = array('name' => 'sgpb-subs-success-redirect-new-tab', 'type' => 'checkbox', 'defaultValue' => '');
875
  $options[] = array('name' => 'sgpb-subs-gdpr-status', 'type' => 'checkbox', 'defaultValue' => '');
 
876
  $options[] = array('name' => 'sgpb-subs-gdpr-label', 'type' => 'text', 'defaultValue' => __('Accept Terms', SG_POPUP_TEXT_DOMAIN));
877
  $options[] = array('name' => 'sgpb-subs-gdpr-text', 'type' => 'text', 'defaultValue' => __(get_bloginfo().' will use the information you provide on this form to be in touch with you and to provide updates and marketing.', SG_POPUP_TEXT_DOMAIN));
878
  $options[] = array('name' => 'sgpb-subs-fields', 'type' => 'sgpb', 'defaultValue' => '');
457
  'data-select-type' => 'basic'
458
  ),
459
  'infoAttrs' => array(
460
+ 'label' => 'Rule',
461
  'info' => __('Allow or Disallow popup showing for the selected conditions.', SG_POPUP_TEXT_DOMAIN)
462
  )
463
  )
480
  /*Target condition config*/
481
  }
482
 
483
+ public static function allFreeExtensionsKeys()
484
+ {
485
+ $keys = array();
486
+
487
+ $keys[] = array(
488
+ 'label' => __('PDF', SG_POPUP_TEXT_DOMAIN),
489
+ 'pluginKey' => 'popupbuilder-pdf/PopupBuilderPdf.php',
490
+ 'key' => 'pdf',
491
+ 'url' => SGPB_PDF_PLUGIN_URL,
492
+ 'availability' => 'free'
493
+ );
494
+
495
+ return $keys;
496
+ }
497
+
498
  public static function allExtensionsKeys()
499
  {
500
  $keys = array();
501
 
502
+ $keys[] = array(
503
+ 'label' => __('Gamification', SG_POPUP_TEXT_DOMAIN),
504
+ 'pluginKey' => 'popupbuilder-gamification/PopupBuilderGamification.php',
505
+ 'key' => 'gamification',
506
+ 'url' => SGPB_GAMIFICATION_PLUGIN_URL
507
+ );
508
  $keys[] = array(
509
  'label' => __('Push Notification', SG_POPUP_TEXT_DOMAIN),
510
  'pluginKey' => 'popupbuilder-push-notification/PopupBuilderPushNotification.php',
894
  $options[] = array('name' => 'sgpb-subs-success-redirect-URL', 'type' => 'text', 'defaultValue' => '');
895
  $options[] = array('name' => 'sgpb-subs-success-redirect-new-tab', 'type' => 'checkbox', 'defaultValue' => '');
896
  $options[] = array('name' => 'sgpb-subs-gdpr-status', 'type' => 'checkbox', 'defaultValue' => '');
897
+ $options[] = array('name' => 'sgpb-subs-show-form-to-top', 'type' => 'checkbox', 'defaultValue' => '');
898
  $options[] = array('name' => 'sgpb-subs-gdpr-label', 'type' => 'text', 'defaultValue' => __('Accept Terms', SG_POPUP_TEXT_DOMAIN));
899
  $options[] = array('name' => 'sgpb-subs-gdpr-text', 'type' => 'text', 'defaultValue' => __(get_bloginfo().' will use the information you provide on this form to be in touch with you and to provide updates and marketing.', SG_POPUP_TEXT_DOMAIN));
900
  $options[] = array('name' => 'sgpb-subs-fields', 'type' => 'sgpb', 'defaultValue' => '');
com/helpers/AdminHelper.php CHANGED
@@ -484,6 +484,10 @@ class AdminHelper
484
 
485
  public static function showMenuForCurrentUser()
486
  {
 
 
 
 
487
  $savedUserRoles = self::getPopupPostAllowedUserRoles();
488
  $currentUserRole = self::getCurrentUserRole();
489
  if (!is_array($savedUserRoles) || !is_array($currentUserRole)) {
@@ -578,17 +582,16 @@ class AdminHelper
578
 
579
  $getUsersObj = get_users(
580
  array(
581
- 'blog_id' => get_current_blog_id()
 
582
  )
583
  );
584
- if (is_array($getUsersObj)) {
585
- foreach ($getUsersObj as $key => $userData) {
586
- if ($userData->ID == get_current_user_id()) {
587
- $roles = $userData->roles;
588
- if (is_array($roles) && !empty($roles)) {
589
- $role[] = $roles[0];
590
- }
591
- }
592
  }
593
  }
594
 
@@ -699,6 +702,30 @@ class AdminHelper
699
  return array_flip($ids);
700
  }
701
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
702
  public static function getAllExtensions()
703
  {
704
  $allExtensions = SgpbDataConfig::allExtensionsKeys();
@@ -1434,6 +1461,7 @@ class AdminHelper
1434
 
1435
  $useragent = @$_SERVER['HTTP_USER_AGENT'];
1436
  preg_match('/iPhone|Android|iPad|iPod|webOS/', $useragent, $matches);
 
1437
  $os = current($matches);
1438
  if ($os == 'iPad' || $os == 'iPhone' || $os == 'iPod') {
1439
  $isIOS = true;
484
 
485
  public static function showMenuForCurrentUser()
486
  {
487
+ if (!is_admin()) {
488
+ return true;
489
+ }
490
+
491
  $savedUserRoles = self::getPopupPostAllowedUserRoles();
492
  $currentUserRole = self::getCurrentUserRole();
493
  if (!is_array($savedUserRoles) || !is_array($currentUserRole)) {
582
 
583
  $getUsersObj = get_users(
584
  array(
585
+ 'blog_id' => get_current_blog_id(),
586
+ 'search' => get_current_user_id()
587
  )
588
  );
589
+
590
+ if (!empty($getUsersObj[0])) {
591
+ $roles = $getUsersObj[0]->roles;
592
+
593
+ if (is_array($roles) && !empty($roles)) {
594
+ $role = array_merge($role, $getUsersObj[0]->roles);
 
 
595
  }
596
  }
597
 
702
  return array_flip($ids);
703
  }
704
 
705
+ public static function getAllFreeExtensions()
706
+ {
707
+ $allExtensions = SgpbDataConfig::allFreeExtensionsKeys();
708
+
709
+ $notActiveExtensions = array();
710
+ $activeExtensions = array();
711
+
712
+ foreach ($allExtensions as $extension) {
713
+ if (!is_plugin_active($extension['pluginKey'])) {
714
+ $notActiveExtensions[] = $extension;
715
+ }
716
+ else {
717
+ $activeExtensions[] = $extension;
718
+ }
719
+ }
720
+
721
+ $divideExtension = array(
722
+ 'noActive' => $notActiveExtensions,
723
+ 'active' => $activeExtensions
724
+ );
725
+
726
+ return $divideExtension;
727
+ }
728
+
729
  public static function getAllExtensions()
730
  {
731
  $allExtensions = SgpbDataConfig::allExtensionsKeys();
1461
 
1462
  $useragent = @$_SERVER['HTTP_USER_AGENT'];
1463
  preg_match('/iPhone|Android|iPad|iPod|webOS/', $useragent, $matches);
1464
+
1465
  $os = current($matches);
1466
  if ($os == 'iPad' || $os == 'iPhone' || $os == 'iPod') {
1467
  $isIOS = true;
com/helpers/ConfigDataHelper.php CHANGED
@@ -398,7 +398,9 @@ class ConfigDataHelper
398
  'user-status' => __('User Status', SG_POPUP_TEXT_DOMAIN),
399
  'after-x' => __('After x pages visit', SG_POPUP_TEXT_DOMAIN),
400
  'user-role' => __('User Role', SG_POPUP_TEXT_DOMAIN),
401
- 'countries' => __('Countries', SG_POPUP_TEXT_DOMAIN)
 
 
402
  );
403
 
404
  $data['closeButtonPositions'] = array(
@@ -1090,7 +1092,8 @@ class ConfigDataHelper
1090
  'areYouSure' => __('Are you sure?', SG_POPUP_TEXT_DOMAIN),
1091
  'addButtonSpinner' => __('Add', SG_POPUP_TEXT_DOMAIN),
1092
  'audioSupportAlertMessage' => __('Only audio files supported (e.g.: mp3, wav, m4a, ogg)', SG_POPUP_TEXT_DOMAIN),
1093
- 'publishPopupBeforeElemntor' => __('Please, publish the popup before starting to use Elementor with it!', SG_POPUP_TEXT_DOMAIN)
 
1094
  );
1095
 
1096
  return $translatedData;
398
  'user-status' => __('User Status', SG_POPUP_TEXT_DOMAIN),
399
  'after-x' => __('After x pages visit', SG_POPUP_TEXT_DOMAIN),
400
  'user-role' => __('User Role', SG_POPUP_TEXT_DOMAIN),
401
+ 'countries' => __('Countries', SG_POPUP_TEXT_DOMAIN),
402
+ 'detect-by-url' => __('Detect by URL', SG_POPUP_TEXT_DOMAIN),
403
+ 'cookie-detection' => __('Cookie Detection', SG_POPUP_TEXT_DOMAIN)
404
  );
405
 
406
  $data['closeButtonPositions'] = array(
1092
  'areYouSure' => __('Are you sure?', SG_POPUP_TEXT_DOMAIN),
1093
  'addButtonSpinner' => __('Add', SG_POPUP_TEXT_DOMAIN),
1094
  'audioSupportAlertMessage' => __('Only audio files supported (e.g.: mp3, wav, m4a, ogg)', SG_POPUP_TEXT_DOMAIN),
1095
+ 'publishPopupBeforeElementor' => __('Please, publish the popup before starting to use Elementor with it!', SG_POPUP_TEXT_DOMAIN),
1096
+ 'publishPopupBeforeDivi' => __('Please, publish the popup before starting to use Divi Builder with it!', SG_POPUP_TEXT_DOMAIN)
1097
  );
1098
 
1099
  return $translatedData;
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.1.9
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.2
7
  * Author: Sygnoos
8
  * Author URI: https://sygnoos.com
9
  * License: GPLv2
public/css/SubscriptionForm.css CHANGED
@@ -167,3 +167,7 @@
167
  .sgpb-subscription-plus-form {
168
  display: inline-block;
169
  }
 
 
 
 
167
  .sgpb-subscription-plus-form {
168
  display: inline-block;
169
  }
170
+
171
+ .sgpb-subscription-admin-wrapper input[type="text"] {
172
+ min-height: 20px !important;
173
+ }
public/css/popupAdminStyles.css CHANGED
@@ -265,6 +265,12 @@
265
  .image-popup {
266
  background-image: url("../img/imageTypeIcon.png");
267
  }
 
 
 
 
 
 
268
  .sgpb-image-div {
269
  background-color: #87e37f !important;
270
  }
@@ -298,6 +304,14 @@
298
  background-color: #ffac49 !important;
299
  }
300
 
 
 
 
 
 
 
 
 
301
  .fblike-popup {
302
  background-image: url("../img/facebookTypeIcon.png");
303
  }
@@ -322,6 +336,19 @@
322
  background-color: #d4a6e0 !important;
323
  }
324
 
 
 
 
 
 
 
 
 
 
 
 
 
 
325
  .pushNotification-popup,
326
  .pushNotification-popup-pro {
327
  background-image: url("../img/pushNotificationTypeIcon.png");
@@ -344,6 +371,14 @@
344
  background-color: rgba(212, 166, 224, 0.4) !important;
345
  }
346
 
 
 
 
 
 
 
 
 
347
  .video-popup {
348
  background-image: url("../img/videoTypeIcon.png");
349
  }
@@ -770,7 +805,15 @@
770
  background-size: cover;
771
  }
772
 
773
-
 
 
 
 
 
 
 
 
774
 
775
  /*condition builder*/
776
  .sg-rules-or {
@@ -880,7 +923,8 @@
880
  text-align: center;
881
  }
882
 
883
- .sgpb-show-image-container {
 
884
  width: 222px;
885
  height: 127px;
886
  background-color: #F8F8F8;
@@ -892,6 +936,7 @@
892
 
893
  .sgpb-show-button-image-container,
894
  .sgpb-show-sales-image-container,
 
895
  .sgpb-show-background-image-container {
896
  background-color: #F8F8F8;
897
  background-size: contain;
@@ -902,6 +947,7 @@
902
  }
903
 
904
  .sgpb-show-button-image-container,
 
905
  .sgpb-show-sales-image-container {
906
  width: 35px;
907
  height: 35px;
@@ -912,6 +958,10 @@
912
  height: 135px;
913
  }
914
 
 
 
 
 
915
  .sgpb-no-image {
916
  display: block;
917
  font: 13px Arial;
@@ -1680,6 +1730,7 @@ input:checked + .sgpb-slider:before {
1680
 
1681
  .sgpb-pro-wrapper,
1682
  .sgpb-free-wrapper,
 
1683
  .sgpb-extensions-wrapper {
1684
  max-width: 850px;
1685
  margin: 0 auto;
@@ -2157,3 +2208,9 @@ input:checked + .sgpb-slider:before {
2157
  .sgpb-text-warning {
2158
  color: #007bff !important;
2159
  }
 
 
 
 
 
 
265
  .image-popup {
266
  background-image: url("../img/imageTypeIcon.png");
267
  }
268
+
269
+ .pdf-popup,
270
+ .pdf-popup-pro {
271
+ background-image: url("../img/pdfTypeIcon.png");
272
+ }
273
+
274
  .sgpb-image-div {
275
  background-color: #87e37f !important;
276
  }
304
  background-color: #ffac49 !important;
305
  }
306
 
307
+ .sgpb-pdf-div {
308
+ background-color: #dc1d00 !important;
309
+ }
310
+
311
+ .sgpb-pdf-div:hover {
312
+ background-color: #ea7766 !important;
313
+ }
314
+
315
  .fblike-popup {
316
  background-image: url("../img/facebookTypeIcon.png");
317
  }
336
  background-color: #d4a6e0 !important;
337
  }
338
 
339
+ .gamification-popup,
340
+ .gamification-popup-pro {
341
+ background-image: url("../img/gamificationIcon.png");
342
+ }
343
+
344
+ .sgpb-gamification-div {
345
+ background-color: #b084bc !important;
346
+ }
347
+
348
+ .sgpb-gamification-div:hover {
349
+ background-color: #d4a6e0 !important;
350
+ }
351
+
352
  .pushNotification-popup,
353
  .pushNotification-popup-pro {
354
  background-image: url("../img/pushNotificationTypeIcon.png");
371
  background-color: rgba(212, 166, 224, 0.4) !important;
372
  }
373
 
374
+ .sgpb-free-extensions-wrapper .sgpb-pdf-div {
375
+ background-color: #ea7766 !important;
376
+ }
377
+
378
+ .sgpb-extensions-wrapper .sgpb-gamification-div {
379
+ background-color: rgba(212, 166, 224, 0.4) !important;
380
+ }
381
+
382
  .video-popup {
383
  background-image: url("../img/videoTypeIcon.png");
384
  }
805
  background-size: cover;
806
  }
807
 
808
+ .sgpb-popup-type-free-pro-ribbon {
809
+ background-image: url(../img/freeProbadge.png);
810
+ position: absolute;
811
+ top: -5px;
812
+ right: -5px;
813
+ width: 71px;
814
+ height: 40px;
815
+ background-size: cover;
816
+ }
817
 
818
  /*condition builder*/
819
  .sg-rules-or {
923
  text-align: center;
924
  }
925
 
926
+ .sgpb-show-image-container,
927
+ .sgpb-show-gamification-image-container {
928
  width: 222px;
929
  height: 127px;
930
  background-color: #F8F8F8;
936
 
937
  .sgpb-show-button-image-container,
938
  .sgpb-show-sales-image-container,
939
+ .sgpb-show-gamification-image-container,
940
  .sgpb-show-background-image-container {
941
  background-color: #F8F8F8;
942
  background-size: contain;
947
  }
948
 
949
  .sgpb-show-button-image-container,
950
+ .sgpb-show-gamification-image-container,
951
  .sgpb-show-sales-image-container {
952
  width: 35px;
953
  height: 35px;
958
  height: 135px;
959
  }
960
 
961
+ .sgpb-show-gamification-image-container {
962
+ margin-top: 0px;
963
+ }
964
+
965
  .sgpb-no-image {
966
  display: block;
967
  font: 13px Arial;
1730
 
1731
  .sgpb-pro-wrapper,
1732
  .sgpb-free-wrapper,
1733
+ .sgpb-free-extensions-wrapper,
1734
  .sgpb-extensions-wrapper {
1735
  max-width: 850px;
1736
  margin: 0 auto;
2208
  .sgpb-text-warning {
2209
  color: #007bff !important;
2210
  }
2211
+
2212
+ .sgpb-info-span {
2213
+ color: #787878;
2214
+ font-style: italic;
2215
+ font-weight: lighter;
2216
+ }
public/css/theme.css CHANGED
@@ -166,4 +166,4 @@ slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0
166
  slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0)}}@keyframes
167
  slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes
168
  slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0)}}@keyframes
169
- slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.sgpb-slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}.sgpb-iframe-spiner{background:url('data:image/gif;base64,R0lGODlh8ABAAaIHALa2tmNjY8XFxdbW1oyMjO/v7+bm5v///yH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4w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KKao4oostujiizDGKOOMNNZo44045qjjjjz26OOPQAYp5JBEFmnkkUgmqeSSTDbJYwIAOw==') center center no-repeat}
166
  slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0)}}@keyframes
167
  slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes
168
  slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0)}}@keyframes
169
+ slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.sgpb-slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}.sgpb-iframe-spiner{background:url('data:image/gif;base64,R0lGODlh8ABAAaIHALa2tmNjY8XFxdbW1oyMjO/v7+bm5v///yH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodH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v38OPLn0+/vv37+PPr38+/v///ZAAGKOCABBZo4IEIJqjgggw26OCDEEYo4YQUVmjhhRhmqOGGHHbo4YcghijiiCSWaOKJKKao4oostujiizDGKOOMNNZo44045qjjjjz26OOPQAYp5JBEFmnkkUgmqeSSTDbJYwIAOw==') center center no-repeat}[id*="__lpform_sgpb-"]{position:fixed !important}
public/img/freeProbadge.png ADDED
Binary file
public/img/gamificationIcon.png ADDED
Binary file
public/img/pdfTypeIcon.png ADDED
Binary file
public/js/Backend.js CHANGED
@@ -1422,7 +1422,14 @@ SGPBBackend.prototype.makePopupTitleRequired = function()
1422
  if (editModeBtn.length) {
1423
  if (!SGPBBackend.getParamFromUrl('post')) {
1424
  editModeBtn.attr('disabled', 'disabled');
1425
- editModeBtn.after('<p class="sgpb-text-warning">'+SGPB_JS_LOCALIZATION.publishPopupBeforeElemntor+'</p>');
 
 
 
 
 
 
 
1426
  }
1427
  }
1428
  if (jQuery('#title').length) {
1422
  if (editModeBtn.length) {
1423
  if (!SGPBBackend.getParamFromUrl('post')) {
1424
  editModeBtn.attr('disabled', 'disabled');
1425
+ editModeBtn.after('<p class="sgpb-text-warning">'+SGPB_JS_LOCALIZATION.publishPopupBeforeElementor+'</p>');
1426
+ }
1427
+ }
1428
+ var editModeBtn = jQuery('#et_pb_toggle_builder');
1429
+ if (editModeBtn.length) {
1430
+ if (!SGPBBackend.getParamFromUrl('post')) {
1431
+ editModeBtn.hide();
1432
+ editModeBtn.after('<p class="sgpb-text-warning">'+SGPB_JS_LOCALIZATION.publishPopupBeforeDivi+'</p>');
1433
  }
1434
  }
1435
  if (jQuery('#title').length) {
public/js/MediaButton.js CHANGED
@@ -2,7 +2,7 @@ function SGPBMediaButton(){}
2
  SGPBMediaButton.prototype.init=function()
3
  {this.tinymceButton();this.openMediaButtonPopup();this.openAskReviewBannerPopup();};SGPBMediaButton.prototype.tinymceButton=function()
4
  {var that=this;jQuery(document).on('tinymce-editor-setup',function(event,editor){editor.settings.toolbar1+=', popupBuilderEditorButton';editor.addButton('popupBuilderEditorButton',{icon:'wp-menu-image dashicons-before dashicons-menu-icon-sgpb sgpb-tinymce-button',onclick:function(){that.mediaButtonPopup();}});});};SGPBMediaButton.prototype.openMediaButtonPopup=function()
5
- {var that=this;jQuery('.sgpb-tinymce-button, .sgpb-insert-media-button-js, .sgpb-insert-js-variable').bind('click',function(e){e.preventDefault();that.mediaButtonPopup(jQuery(this));});};SGPBMediaButton.prototype.mediaButtonPopup=function(currentTag)
6
  {var select2Init=1;var that=this;var hiddenDivId=jQuery(currentTag).attr('data-id')||'sgpb-hidden-media-popup';var popupConfigObj=new PopupConfig();popupConfigObj.magicCall('setContentPadding',14);popupConfigObj.magicCall('setContentBorderRadius',4);popupConfigObj.magicCall('setContentBorderRadiusType','px');popupConfigObj.magicCall('setContentBorderWidth',5);popupConfigObj.magicCall('setContentBorderColor','#506274');popupConfigObj.magicCall('setShadowSpread',1);popupConfigObj.magicCall('setContentShadowBlur',4);popupConfigObj.magicCall('setContentShadowColor','#cccccc');popupConfigObj.magicCall('setMinWidth',400);popupConfigObj.magicCall('setSrcElement',hiddenDivId);popupConfigObj.magicCall('setOverlayColor','black');popupConfigObj.magicCall('setOverlayOpacity',40);var config=popupConfigObj.combineConfigObj();var popup=new SGPopup(config);popup.open();jQuery(window).bind('sgpbDidOpen',function(){jQuery('.sgpb-insert-popup').addClass('js-sg-select2');if(mediaButtonParams.currentPostType!=mediaButtonParams.popupBuilderPostType){jQuery('.sgpb-insert-popup-event').addClass('js-sg-select2');if(select2Init==1){that.popupSelect2();}
7
  select2Init++;jQuery('.select2-container--below').remove();that.popupSelect2();}
8
  else{that.popupSelect2();jQuery('.select2-container--below').remove();}
@@ -19,18 +19,18 @@ SGPBMediaButton.prototype.closeMediaButtonPopup=function(popup)
19
  {jQuery('.sgpb-close-media-popup-js').on('click',function(){popup.close();});};SGPBMediaButton.prototype.closeReviewPopup=function(popup)
20
  {jQuery('.sgpb-button-2').on('click',function(){popup.close();});};SGPBMediaButton.prototype.insertPopup=function(popup)
21
  {var insidePopup=false;if(mediaButtonParams.currentPostType==mediaButtonParams.popupBuilderPostType){insidePopup=true;}
22
- jQuery('.sgpb-insert-popup-js').bind('click',function(){var selectedContent='';var selectedPopup=jQuery('.sgpb-insert-popup').val();var selectedPopupEvent=jQuery('.sgpb-insert-popup-event').val();if(typeof selectedPopupEvent!='undefined'){selectedPopupEvent=' event="'+selectedPopupEvent+'"';}
23
  else{selectedPopupEvent='';if(insidePopup){selectedPopupEvent=' insidePopup="on"';}}
24
  if(selectedPopup==''||selectedPopup==null){popup.close();return;}
25
  if(selectedPopupEvent=='onLoad'&&!insidePopup){window.send_to_editor('[sg_popup id="'+selectedPopup+'"'+selectedPopupEvent+'][/sg_popup]');popup.close();return;}
26
  if(typeof tinyMCE.editors.content!='undefined'&&(document.getElementById('content').offsetParent===null)){selectedContent=(tinyMCE.activeEditor.selection.getContent())?tinyMCE.activeEditor.selection.getContent():'';}
27
  else{var content=document.getElementById('content');var selectedContent;if(typeof document.selection!='undefined'){content.focus();var sel=document.selection.createRange();selectedContent=sel.text;}
28
  else if(typeof content!='undefined'&&content!=null){if(typeof content.selectionStart!='undefined'){var startPos=content.selectionStart;var endPos=content.selectionEnd;selectedContent=content.value.substring(startPos,endPos);}}}
29
- window.send_to_editor('[sg_popup id="'+selectedPopup+'"'+selectedPopupEvent+']'+selectedContent+'[/sg_popup]');popup.close();});jQuery('.sgpb-insert-js-variable-to-editor').bind('click',function(){var jsVariableSelector=jQuery('.sgpb-popup-dialog-main-div-wrapper .sgpb-js-variable-selector').val();var jsVariableAttribute=jQuery('.sgpb-popup-dialog-main-div-wrapper .sgpb-js-variable-attribute').val();jQuery('.sgpb-js-variable-errors').addClass('sg-hide-element');var valid=true;if(jsVariableSelector==''){valid=false;jQuery('.sgpb-js-variable-selector-error').removeClass('sg-hide-element');}
30
  if(jsVariableAttribute==''){valid=false;jQuery('.sgpb-js-variable-attribute-error').removeClass('sg-hide-element');}
31
  if(!valid){return false;}
32
  jQuery('.sgpb-js-variable-errors').addClass('sg-hide-element');window.send_to_editor('[pbvariable selector="'+jsVariableSelector+'" attribute="'+jsVariableAttribute+'"]');popup.close();});};SGPBMediaButton.prototype.popupSelect2=function()
33
  {if(!jQuery('.js-sg-select2').length){return;}
34
  jQuery('select.js-sg-select2').each(function(){var type=jQuery(this).attr('data-select-type');var className=jQuery(this).attr('data-select-class');var options={width:'100%'};if(type=='ajax'){if(typeof SGPB_JS_PARAMS=='undefined'){return;}
35
  options=jQuery.extend(options,{minimumInputLength:1,ajax:{url:SGPB_JS_PARAMS.url,dataType:'json',delay:250,type:'POST',data:function(params){var searchKey=jQuery(this).attr('data-value-param');return{action:'select2_search_data',nonce_ajax:SGPB_JS_PARAMS.nonce,searchTerm:params.term,searchKey:searchKey};},processResults:function(data){return{results:jQuery.map(data.items,function(item){return{text:item.text,id:item.id}})};}}});}
36
- jQuery(this).sgpbselect2(options);});};jQuery(document).ready(function(){var mediaButton=new SGPBMediaButton();mediaButton.init();});
2
  SGPBMediaButton.prototype.init=function()
3
  {this.tinymceButton();this.openMediaButtonPopup();this.openAskReviewBannerPopup();};SGPBMediaButton.prototype.tinymceButton=function()
4
  {var that=this;jQuery(document).on('tinymce-editor-setup',function(event,editor){editor.settings.toolbar1+=', popupBuilderEditorButton';editor.addButton('popupBuilderEditorButton',{icon:'wp-menu-image dashicons-before dashicons-menu-icon-sgpb sgpb-tinymce-button',onclick:function(){that.mediaButtonPopup();}});});};SGPBMediaButton.prototype.openMediaButtonPopup=function()
5
+ {var that=this;jQuery('.sgpb-tinymce-button, .sgpb-insert-media-button-js, .sgpb-insert-js-variable').unbind('click').bind('click',function(e){e.preventDefault();that.mediaButtonPopup(jQuery(this));});};SGPBMediaButton.prototype.mediaButtonPopup=function(currentTag)
6
  {var select2Init=1;var that=this;var hiddenDivId=jQuery(currentTag).attr('data-id')||'sgpb-hidden-media-popup';var popupConfigObj=new PopupConfig();popupConfigObj.magicCall('setContentPadding',14);popupConfigObj.magicCall('setContentBorderRadius',4);popupConfigObj.magicCall('setContentBorderRadiusType','px');popupConfigObj.magicCall('setContentBorderWidth',5);popupConfigObj.magicCall('setContentBorderColor','#506274');popupConfigObj.magicCall('setShadowSpread',1);popupConfigObj.magicCall('setContentShadowBlur',4);popupConfigObj.magicCall('setContentShadowColor','#cccccc');popupConfigObj.magicCall('setMinWidth',400);popupConfigObj.magicCall('setSrcElement',hiddenDivId);popupConfigObj.magicCall('setOverlayColor','black');popupConfigObj.magicCall('setOverlayOpacity',40);var config=popupConfigObj.combineConfigObj();var popup=new SGPopup(config);popup.open();jQuery(window).bind('sgpbDidOpen',function(){jQuery('.sgpb-insert-popup').addClass('js-sg-select2');if(mediaButtonParams.currentPostType!=mediaButtonParams.popupBuilderPostType){jQuery('.sgpb-insert-popup-event').addClass('js-sg-select2');if(select2Init==1){that.popupSelect2();}
7
  select2Init++;jQuery('.select2-container--below').remove();that.popupSelect2();}
8
  else{that.popupSelect2();jQuery('.select2-container--below').remove();}
19
  {jQuery('.sgpb-close-media-popup-js').on('click',function(){popup.close();});};SGPBMediaButton.prototype.closeReviewPopup=function(popup)
20
  {jQuery('.sgpb-button-2').on('click',function(){popup.close();});};SGPBMediaButton.prototype.insertPopup=function(popup)
21
  {var insidePopup=false;if(mediaButtonParams.currentPostType==mediaButtonParams.popupBuilderPostType){insidePopup=true;}
22
+ jQuery('.sgpb-insert-popup-js').unbind('click').bind('click',function(){var selectedContent='';var selectedPopup=jQuery('.sgpb-insert-popup').val();var selectedPopupEvent=jQuery('.sgpb-insert-popup-event').val();if(typeof selectedPopupEvent!='undefined'){selectedPopupEvent=' event="'+selectedPopupEvent+'"';}
23
  else{selectedPopupEvent='';if(insidePopup){selectedPopupEvent=' insidePopup="on"';}}
24
  if(selectedPopup==''||selectedPopup==null){popup.close();return;}
25
  if(selectedPopupEvent=='onLoad'&&!insidePopup){window.send_to_editor('[sg_popup id="'+selectedPopup+'"'+selectedPopupEvent+'][/sg_popup]');popup.close();return;}
26
  if(typeof tinyMCE.editors.content!='undefined'&&(document.getElementById('content').offsetParent===null)){selectedContent=(tinyMCE.activeEditor.selection.getContent())?tinyMCE.activeEditor.selection.getContent():'';}
27
  else{var content=document.getElementById('content');var selectedContent;if(typeof document.selection!='undefined'){content.focus();var sel=document.selection.createRange();selectedContent=sel.text;}
28
  else if(typeof content!='undefined'&&content!=null){if(typeof content.selectionStart!='undefined'){var startPos=content.selectionStart;var endPos=content.selectionEnd;selectedContent=content.value.substring(startPos,endPos);}}}
29
+ window.send_to_editor('[sg_popup id="'+selectedPopup+'"'+selectedPopupEvent+']'+selectedContent+'[/sg_popup]');popup.close();});jQuery('.sgpb-insert-js-variable-to-editor').unbind('click').bind('click',function(){var jsVariableSelector=jQuery('.sgpb-popup-dialog-main-div-wrapper .sgpb-js-variable-selector').val();var jsVariableAttribute=jQuery('.sgpb-popup-dialog-main-div-wrapper .sgpb-js-variable-attribute').val();jQuery('.sgpb-js-variable-errors').addClass('sg-hide-element');var valid=true;if(jsVariableSelector==''){valid=false;jQuery('.sgpb-js-variable-selector-error').removeClass('sg-hide-element');}
30
  if(jsVariableAttribute==''){valid=false;jQuery('.sgpb-js-variable-attribute-error').removeClass('sg-hide-element');}
31
  if(!valid){return false;}
32
  jQuery('.sgpb-js-variable-errors').addClass('sg-hide-element');window.send_to_editor('[pbvariable selector="'+jsVariableSelector+'" attribute="'+jsVariableAttribute+'"]');popup.close();});};SGPBMediaButton.prototype.popupSelect2=function()
33
  {if(!jQuery('.js-sg-select2').length){return;}
34
  jQuery('select.js-sg-select2').each(function(){var type=jQuery(this).attr('data-select-type');var className=jQuery(this).attr('data-select-class');var options={width:'100%'};if(type=='ajax'){if(typeof SGPB_JS_PARAMS=='undefined'){return;}
35
  options=jQuery.extend(options,{minimumInputLength:1,ajax:{url:SGPB_JS_PARAMS.url,dataType:'json',delay:250,type:'POST',data:function(params){var searchKey=jQuery(this).attr('data-value-param');return{action:'select2_search_data',nonce_ajax:SGPB_JS_PARAMS.nonce,searchTerm:params.term,searchKey:searchKey};},processResults:function(data){return{results:jQuery.map(data.items,function(item){return{text:item.text,id:item.id}})};}}});}
36
+ jQuery(this).sgpbselect2(options);});};jQuery(document).ready(function(){var mediaButton=new SGPBMediaButton();jQuery(document).on('tinymce-editor-init',function(event,editor){mediaButton.init();});});
public/js/Popup.js CHANGED
@@ -7,7 +7,7 @@ else{SGPopup.inlinePrevTarget.node.appendChild(htmlElement);}}}
7
  var OPEN_ANIMATION_POP="@-webkit-keyframes popin{from{-webkit-transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);opacity:1}}@-moz-keyframes popin{from{-moz-transform:scale(.8);opacity:0}to{-moz-transform:scale(1);opacity:1}}@keyframes popin{from{transform:scale(.8);opacity:0}to{transform:scale(1);opacity:1}}";var OPEN_ANIMATION_FADE="@-webkit-keyframes fadein{from{opacity:0}to{opacity:1}}@-moz-keyframes fadein{from{opacity:0}to{opacity:1}}@keyframes fadein{from{opacity:0}to{opacity:1}}";var OPEN_ANIMATION_FLIP="@-webkit-keyframes flipintoright{from{-webkit-transform:rotateY(90deg) scale(.9)}to{-webkit-transform:rotateY(0)}}@-moz-keyframes flipintoright{from{-moz-transform:rotateY(90deg) scale(.9)}to{-moz-transform:rotateY(0)}}@keyframes flipintoright{from{transform:rotateY(90deg) scale(.9)}to{transform:rotateY(0)}}";var OPEN_ANIMATION_SLIDELEFT="@-webkit-keyframes slideinfromright{from{-webkit-transform:translate3d({start},0,0)}to{-webkit-transform:translate3d(0,0,0)}}@-moz-keyframes slideinfromright{from{-moz-transform:translateX({start})}to{-moz-transform:translateX(0)}}@keyframes slideinfromright{from{transform:translateX({start})}to{transform:translateX(0)}}";var OPEN_ANIMATION_SLIDERIGHT="@-webkit-keyframes slideinfromleft{from{-webkit-transform:translate3d({start},0,0)}to{-webkit-transform:translate3d(0,0,0)}}@-moz-keyframes slideinfromleft{from{-moz-transform:translateX({start})}to{-moz-transform:translateX(0)}}@keyframes slideinfromleft{from{transform:translateX({start})}to{transform:translateX(0)}}";var OPEN_ANIMATION_FLOW="@-webkit-keyframes flowinfromright{0%{-webkit-transform:translateX(100%) scale(.7)}30%,40%{-webkit-transform:translateX(0) scale(.7)}100%{-webkit-transform:translateX(0) scale(1)}}@-moz-keyframes flowinfromright{0%{-moz-transform:translateX(100%) scale(.7)}30%,40%{-moz-transform:translateX(0) scale(.7)}100%{-moz-transform:translateX(0) scale(1)}}@keyframes flowinfromright{0%{transform:translateX(100%) scale(.7)}30%,40%{transform:translateX(0) scale(.7)}100%{transform:translateX(0) scale(1)}}";var OPEN_ANIMATION_SLIDEUP="@-webkit-keyframes slideinfrombottom{from{-webkit-transform:translateY({start})}to{-webkit-transform:translateY(0)}}@-moz-keyframes slideinfrombottom{from{-moz-transform:translateY({start})}to{-moz-transform:translateY(0)}}@keyframes slideinfrombottom{from{transform:translateY({start})}to{transform:translateY(0)}}";var OPEN_ANIMATION_SLIDEDOWN="@-webkit-keyframes slideinfromtop{from{-webkit-transform:translateY({start})}to{-webkit-transform:translateY(0)}}@-moz-keyframes slideinfromtop{from{-moz-transform:translateY({start})}to{-moz-transform:translateY(0)}}@keyframes slideinfromtop{from{transform:translateY({start})}to{transform:translateY(0)}}";var CLOSE_ANIMATION_SLIDELEFT="@-webkit-keyframes slideouttoleft{from{-webkit-transform:translate3d(0,0,0)}to{-webkit-transform:translate3d({end},0,0)}}@-moz-keyframes slideouttoleft{from{-moz-transform:translateX(0)}to{-moz-transform:translateX({end})}}@keyframes slideouttoleft{from{transform:translateX(0)}to{transform:translateX({end})}}";var CLOSE_ANIMATION_SLIDERIGHT="@-webkit-keyframes slideouttoright{from{-webkit-transform:translate3d(0,0,0)}to{-webkit-transform:translate3d({end},0,0)}}@-moz-keyframes slideouttoright{from{-moz-transform:translateX(0)}to{-moz-transform:translateX({end})}}@keyframes slideouttoright{from{transform:translateX(0)}to{transform:translateX({end})}}";var CLOSE_ANIMATION_POP="@-webkit-keyframes popout{from{-webkit-transform:scale(1);opacity:1}to{-webkit-transform:scale(.8);opacity:0}}@-moz-keyframes popout{from{-moz-transform:scale(1);opacity:1}to{-moz-transform:scale(.8);opacity:0}}@keyframes popout{from{transform:scale(1);opacity:1}to{transform:scale(.8);opacity:0}}";var CLOSE_ANIMATION_FADE="@-webkit-keyframes fadeout{from{opacity:1}to{opacity:0}}@-moz-keyframes fadeout{from{opacity:1}to{opacity:0}}@keyframes fadeout{from{opacity:1}to{opacity:0}}";var CLOSE_ANIMATION_FLIP="@-webkit-keyframes flipouttoright{from{-webkit-transform:rotateY(0)}to{-webkit-transform:rotateY(90deg) scale(.9)}}@-moz-keyframes flipouttoright{from{-moz-transform:rotateY(0)}to{-moz-transform:rotateY(90deg) scale(.9)}}@keyframes flipouttoright{from{transform:rotateY(0)}to{transform:rotateY(90deg) scale(.9)}}";var CLOSE_ANIMATION_FLOW="@-webkit-keyframes flowouttoright{0%{-webkit-transform:translateX(0) scale(1)}60%,70%{-webkit-transform:translateX(0) scale(.7)}100%{-webkit-transform:translateX(100%) scale(.7)}}@-moz-keyframes flowouttoright{0%{-moz-transform:translateX(0) scale(1)}60%,70%{-moz-transform:translateX(0) scale(.7)}100%{-moz-transform:translateX(100%) scale(.7)}}@keyframes flowouttoright{0%{transform:translateX(0) scale(1)}60%,70%{transform:translateX(0) scale(.7)}100%{transform:translateX(100%) scale(.7)}}";var CLOSE_ANIMATION_SLIDEUP="@-webkit-keyframes slideouttotop{from{-webkit-transform:translateY(0)}to{-webkit-transform:translateY({end})}}@-moz-keyframes slideouttotop{from{-moz-transform:translateY(0)}to{-moz-transform:translateY({end})}}@keyframes slideouttotop{from{transform:translateY(0)}to{transform:translateY({end})}}";var CLOSE_ANIMATION_SLIDEDOWN="@-webkit-keyframes slideouttobottom{from{-webkit-transform:translateY(0)}to{-webkit-transform:translateY({end})}}@-moz-keyframes slideouttobottom{from{-moz-transform:translateY(0)}to{-moz-transform:translateY({end})}}@keyframes slideouttobottom{from{transform:translateY(0)}to{transform:translateY({end})}}";function addAnimationClass(classString)
8
  {var style=document.createElement('style');style.type='text/css';style.innerHTML=classString;style.id=prefix+"-effect-custom-style";document.getElementsByTagName('head')[0].appendChild(style);}
9
  function setMainDivStyles(sizeConfig)
10
- {contentDiv.style.zIndex=defaultZIndex+10;mainDiv.style.boxSizing='content-box';if(sizeConfig.minHeight!=-1){var minHeight=sizeConfig.minHeight;var popupMinHeight=window.innerHeight;if(typeof minHeight=='string'&&minHeight.indexOf('%')!=-1){var popupMinhHeight=(popupMinhHeight/100)*parseInt(minHeight);mainDiv.style.minHeight=popupMinhHeight+'px';}
11
  else{mainDiv.style.minHeight=parseInt(minHeight)+'px';}}
12
  if(sizeConfig.minWidth!=-1){var popupMinhWidth=window.innerWidth;var minWidth=sizeConfig.minWidth;if(typeof minWidth=='string'&&minWidth.indexOf('%')!=-1){var popupMinhWidth=(popupMinhWidth/100)*parseInt(minWidth);mainDiv.style.minWidth=popupMinhWidth+'px';}
13
  else{mainDiv.style.minWidth=parseInt(minWidth)+'px';}}
7
  var OPEN_ANIMATION_POP="@-webkit-keyframes popin{from{-webkit-transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);opacity:1}}@-moz-keyframes popin{from{-moz-transform:scale(.8);opacity:0}to{-moz-transform:scale(1);opacity:1}}@keyframes popin{from{transform:scale(.8);opacity:0}to{transform:scale(1);opacity:1}}";var OPEN_ANIMATION_FADE="@-webkit-keyframes fadein{from{opacity:0}to{opacity:1}}@-moz-keyframes fadein{from{opacity:0}to{opacity:1}}@keyframes fadein{from{opacity:0}to{opacity:1}}";var OPEN_ANIMATION_FLIP="@-webkit-keyframes flipintoright{from{-webkit-transform:rotateY(90deg) scale(.9)}to{-webkit-transform:rotateY(0)}}@-moz-keyframes flipintoright{from{-moz-transform:rotateY(90deg) scale(.9)}to{-moz-transform:rotateY(0)}}@keyframes flipintoright{from{transform:rotateY(90deg) scale(.9)}to{transform:rotateY(0)}}";var OPEN_ANIMATION_SLIDELEFT="@-webkit-keyframes slideinfromright{from{-webkit-transform:translate3d({start},0,0)}to{-webkit-transform:translate3d(0,0,0)}}@-moz-keyframes slideinfromright{from{-moz-transform:translateX({start})}to{-moz-transform:translateX(0)}}@keyframes slideinfromright{from{transform:translateX({start})}to{transform:translateX(0)}}";var OPEN_ANIMATION_SLIDERIGHT="@-webkit-keyframes slideinfromleft{from{-webkit-transform:translate3d({start},0,0)}to{-webkit-transform:translate3d(0,0,0)}}@-moz-keyframes slideinfromleft{from{-moz-transform:translateX({start})}to{-moz-transform:translateX(0)}}@keyframes slideinfromleft{from{transform:translateX({start})}to{transform:translateX(0)}}";var OPEN_ANIMATION_FLOW="@-webkit-keyframes flowinfromright{0%{-webkit-transform:translateX(100%) scale(.7)}30%,40%{-webkit-transform:translateX(0) scale(.7)}100%{-webkit-transform:translateX(0) scale(1)}}@-moz-keyframes flowinfromright{0%{-moz-transform:translateX(100%) scale(.7)}30%,40%{-moz-transform:translateX(0) scale(.7)}100%{-moz-transform:translateX(0) scale(1)}}@keyframes flowinfromright{0%{transform:translateX(100%) scale(.7)}30%,40%{transform:translateX(0) scale(.7)}100%{transform:translateX(0) scale(1)}}";var OPEN_ANIMATION_SLIDEUP="@-webkit-keyframes slideinfrombottom{from{-webkit-transform:translateY({start})}to{-webkit-transform:translateY(0)}}@-moz-keyframes slideinfrombottom{from{-moz-transform:translateY({start})}to{-moz-transform:translateY(0)}}@keyframes slideinfrombottom{from{transform:translateY({start})}to{transform:translateY(0)}}";var OPEN_ANIMATION_SLIDEDOWN="@-webkit-keyframes slideinfromtop{from{-webkit-transform:translateY({start})}to{-webkit-transform:translateY(0)}}@-moz-keyframes slideinfromtop{from{-moz-transform:translateY({start})}to{-moz-transform:translateY(0)}}@keyframes slideinfromtop{from{transform:translateY({start})}to{transform:translateY(0)}}";var CLOSE_ANIMATION_SLIDELEFT="@-webkit-keyframes slideouttoleft{from{-webkit-transform:translate3d(0,0,0)}to{-webkit-transform:translate3d({end},0,0)}}@-moz-keyframes slideouttoleft{from{-moz-transform:translateX(0)}to{-moz-transform:translateX({end})}}@keyframes slideouttoleft{from{transform:translateX(0)}to{transform:translateX({end})}}";var CLOSE_ANIMATION_SLIDERIGHT="@-webkit-keyframes slideouttoright{from{-webkit-transform:translate3d(0,0,0)}to{-webkit-transform:translate3d({end},0,0)}}@-moz-keyframes slideouttoright{from{-moz-transform:translateX(0)}to{-moz-transform:translateX({end})}}@keyframes slideouttoright{from{transform:translateX(0)}to{transform:translateX({end})}}";var CLOSE_ANIMATION_POP="@-webkit-keyframes popout{from{-webkit-transform:scale(1);opacity:1}to{-webkit-transform:scale(.8);opacity:0}}@-moz-keyframes popout{from{-moz-transform:scale(1);opacity:1}to{-moz-transform:scale(.8);opacity:0}}@keyframes popout{from{transform:scale(1);opacity:1}to{transform:scale(.8);opacity:0}}";var CLOSE_ANIMATION_FADE="@-webkit-keyframes fadeout{from{opacity:1}to{opacity:0}}@-moz-keyframes fadeout{from{opacity:1}to{opacity:0}}@keyframes fadeout{from{opacity:1}to{opacity:0}}";var CLOSE_ANIMATION_FLIP="@-webkit-keyframes flipouttoright{from{-webkit-transform:rotateY(0)}to{-webkit-transform:rotateY(90deg) scale(.9)}}@-moz-keyframes flipouttoright{from{-moz-transform:rotateY(0)}to{-moz-transform:rotateY(90deg) scale(.9)}}@keyframes flipouttoright{from{transform:rotateY(0)}to{transform:rotateY(90deg) scale(.9)}}";var CLOSE_ANIMATION_FLOW="@-webkit-keyframes flowouttoright{0%{-webkit-transform:translateX(0) scale(1)}60%,70%{-webkit-transform:translateX(0) scale(.7)}100%{-webkit-transform:translateX(100%) scale(.7)}}@-moz-keyframes flowouttoright{0%{-moz-transform:translateX(0) scale(1)}60%,70%{-moz-transform:translateX(0) scale(.7)}100%{-moz-transform:translateX(100%) scale(.7)}}@keyframes flowouttoright{0%{transform:translateX(0) scale(1)}60%,70%{transform:translateX(0) scale(.7)}100%{transform:translateX(100%) scale(.7)}}";var CLOSE_ANIMATION_SLIDEUP="@-webkit-keyframes slideouttotop{from{-webkit-transform:translateY(0)}to{-webkit-transform:translateY({end})}}@-moz-keyframes slideouttotop{from{-moz-transform:translateY(0)}to{-moz-transform:translateY({end})}}@keyframes slideouttotop{from{transform:translateY(0)}to{transform:translateY({end})}}";var CLOSE_ANIMATION_SLIDEDOWN="@-webkit-keyframes slideouttobottom{from{-webkit-transform:translateY(0)}to{-webkit-transform:translateY({end})}}@-moz-keyframes slideouttobottom{from{-moz-transform:translateY(0)}to{-moz-transform:translateY({end})}}@keyframes slideouttobottom{from{transform:translateY(0)}to{transform:translateY({end})}}";function addAnimationClass(classString)
8
  {var style=document.createElement('style');style.type='text/css';style.innerHTML=classString;style.id=prefix+"-effect-custom-style";document.getElementsByTagName('head')[0].appendChild(style);}
9
  function setMainDivStyles(sizeConfig)
10
+ {jQuery(window).trigger('sgpbPopupBuilderAdditionalDimensionSettings');contentDiv.style.zIndex=defaultZIndex+10;mainDiv.style.boxSizing='content-box';if(sizeConfig.minHeight!=-1){var minHeight=sizeConfig.minHeight;var popupMinHeight=window.innerHeight;if(typeof minHeight=='string'&&minHeight.indexOf('%')!=-1){var popupMinhHeight=(popupMinhHeight/100)*parseInt(minHeight);mainDiv.style.minHeight=popupMinhHeight+'px';}
11
  else{mainDiv.style.minHeight=parseInt(minHeight)+'px';}}
12
  if(sizeConfig.minWidth!=-1){var popupMinhWidth=window.innerWidth;var minWidth=sizeConfig.minWidth;if(typeof minWidth=='string'&&minWidth.indexOf('%')!=-1){var popupMinhWidth=(popupMinhWidth/100)*parseInt(minWidth);mainDiv.style.minWidth=popupMinhWidth+'px';}
13
  else{mainDiv.style.minWidth=parseInt(minWidth)+'px';}}
public/js/PopupBuilder.js CHANGED
@@ -13,6 +13,7 @@ function SGPBPopup()
13
  this.id = null;
14
  this.eventName = '';
15
  this.popupData = null;
 
16
  this.popupConfig = {};
17
  this.popupObj = null;
18
  this.onceListener();
@@ -56,7 +57,13 @@ function SGPBPopup()
56
 
57
  SGPBPopup.listeners = function () {
58
  var that = this;
 
 
 
 
 
59
  sgAddEvent(window, 'sgpbDidOpen', function(e) {
 
60
  var args = e.detail;
61
  var popupOptions = args.popupData;
62
 
@@ -92,6 +99,46 @@ SGPBPopup.listeners = function () {
92
  }, 600);
93
  };
94
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  SGPBPopup.prototype.setCountPopupOpen = function(countPopupOpen)
96
  {
97
  this.countPopupOpen = countPopupOpen;
@@ -631,94 +678,6 @@ SGPBPopup.prototype.getPopupShowLimitationCookieDetails = function(popupData)
631
  return result;
632
  }
633
 
634
- SGPBPopup.prototype.popupLimitation = function(popupData)
635
- {
636
- var currentUrl = window.location.href;
637
- var currentPopupId = popupData['sgpb-post-id'];
638
-
639
- /*Cookie names*/
640
- var popupLimitationCookieHomePageLevelName = 'SGPBShowingLimitationHomePage' + currentPopupId;
641
- var popupLimitationCookiePageLevelName = 'SGPBShowingLimitationPage' + currentPopupId;
642
- var popupLimitationCookieDomainName = 'SGPBShowingLimitationDomain' + currentPopupId;
643
-
644
- /*enable||disable*/
645
- var popupLimitation = popupData['sgpb-show-popup-same-user'];
646
-
647
- if (typeof popupLimitation != 'undefined' && popupLimitation) {
648
- var popupShowingLimit = popupData['sgpb-show-popup-same-user-count'];
649
- var popupShowingLimitExpiry = popupData['sgpb-show-popup-same-user-expiry'];
650
- var pageLevelCookie = popupData['sgpb-show-popup-same-user-page-level'];
651
-
652
- if (typeof pageLevelCookie == 'undefined') {
653
- pageLevelCookie = '';
654
- }
655
-
656
- /*check if current url is home page*/
657
- if (currentUrl == SGPB_POPUP_PARAMS.homePageUrl) {
658
- popupLimitationCookiePageLevelName = popupLimitationCookieHomePageLevelName;
659
- }
660
-
661
- var popupLimitationPageLevelCookie = SGPopup.getCookie(popupLimitationCookiePageLevelName);
662
- var popupLimitationDomainCookie = SGPopup.getCookie(popupLimitationCookieDomainName);
663
-
664
- /* page level cookie saving selected */
665
- if (pageLevelCookie) {
666
- /* if has already another saving level cookie */
667
- if (popupLimitationPageLevelCookie == '') {
668
- var cookieObject = {
669
- openingCount : 1,
670
- pageLevelCookie : pageLevelCookie,
671
- openingPage : currentUrl
672
- };
673
- SGPBPopup.setCookie(popupLimitationCookiePageLevelName, JSON.stringify(cookieObject), popupShowingLimitExpiry, currentUrl);
674
- }
675
- else {
676
- var popupLimitationPageLevelCookie = jQuery.parseJSON(popupLimitationPageLevelCookie);
677
- if (popupShowingLimit <= popupLimitationPageLevelCookie.openingCount) {
678
- return false;
679
- }
680
-
681
- var updatedCount = parseInt(popupLimitationPageLevelCookie.openingCount + 1);
682
- popupLimitationPageLevelCookie.openingCount = updatedCount;
683
- SGPBPopup.setCookie(popupLimitationCookiePageLevelName, JSON.stringify(popupLimitationPageLevelCookie), popupShowingLimitExpiry, currentUrl);
684
- }
685
- SGPBPopup.deleteCookie(popupLimitationCookieDomainName);
686
- }
687
- /* domain level cookie saving selected */
688
- else {
689
- if (typeof popupLimitationPageLevelCookie == 'undefined') {
690
- popupLimitationPageLevelCookie = '';
691
- }
692
- if (popupLimitationPageLevelCookie != '') {
693
- var popupLimitationPageLevelCookie = jQuery.parseJSON(popupLimitationPageLevelCookie);
694
- }
695
- /* if has already another saving level cookie */
696
- if (popupLimitationPageLevelCookie) {
697
- SGPBPopup.deleteCookie(popupLimitationCookiePageLevelName, popupLimitationPageLevelCookie.openingPage);
698
- }
699
-
700
- if (popupLimitationDomainCookie == '') {
701
- var cookieObject = {
702
- openingCount : 1,
703
- pageLevelCookie : pageLevelCookie
704
- };
705
- SGPBPopup.setCookie(popupLimitationCookieDomainName, JSON.stringify(cookieObject), popupShowingLimitExpiry, pageLevelCookie);
706
- }
707
- else {
708
- var popupLimitationDomainCookie = jQuery.parseJSON(popupLimitationDomainCookie);
709
- if (popupShowingLimit <= popupLimitationDomainCookie.openingCount) {
710
- return false;
711
- }
712
- var updatedCount = parseInt(popupLimitationDomainCookie.openingCount + 1);
713
- popupLimitationDomainCookie.openingCount = updatedCount;
714
- SGPBPopup.setCookie(popupLimitationCookieDomainName, JSON.stringify(popupLimitationDomainCookie), popupShowingLimitExpiry, pageLevelCookie);
715
- }
716
- }
717
- }
718
-
719
- return true;
720
- };
721
-
722
  SGPBPopup.prototype.themeCreator = function()
723
  {
724
  var noPositionSelected = false;
@@ -744,6 +703,7 @@ SGPBPopup.prototype.themeCreator = function()
744
  var closeButtonImage = popupConfig.closeButtonImage;
745
  var themeNumber = 1;
746
  var backgroundColor = 'black';
 
747
  var recentSalesPopup = false;
748
  if (typeof SgpbRecentSalesPopupType != 'undefined') {
749
  if (popupType == SgpbRecentSalesPopupType) {
@@ -751,11 +711,14 @@ SGPBPopup.prototype.themeCreator = function()
751
  popupTheme = 'sgpb-theme-2';
752
  closeButtonPosition = 'topRight';
753
  backgroundColor = 'white';
 
754
  top = '-10';
755
  right = '-10';
756
- popupConfig.magicCall('setShadowSpread', 3);
757
  popupConfig.magicCall('setContentShadowBlur', 5);
758
  popupConfig.magicCall('setOverlayVisible', false);
 
 
759
  }
760
  }
761
  var themeIndexNum = popupTheme[popupTheme.length -1];
@@ -812,7 +775,7 @@ SGPBPopup.prototype.themeCreator = function()
812
  popupConfig.magicCall('setButtonInside', false);
813
  popupConfig.magicCall('setContentBorderWidth', 1);
814
  popupConfig.magicCall('setContentBackgroundColor', backgroundColor);
815
- popupConfig.magicCall('setContentBorderColor', 'inherit');
816
  popupConfig.magicCall('setOverlayColor', 'white');
817
  var rightPosition = '0';
818
  var topPosition = '-' + closeButtonHeight + 'px';
@@ -1024,15 +987,18 @@ SGPBPopup.prototype.themeCustomizations = function()
1024
  }
1025
 
1026
  var overlayClasses = popupTheme+'-overlay sgpb-popup-overlay-'+popupId;
1027
- /* for old users, which didn't have enable/disable overlay option */
1028
- if (typeof popupData['sgpb-enable-popup-overlay'] == 'undefined') {
1029
- popupData['sgpb-enable-popup-overlay'] = true;
 
 
 
 
1030
  }
1031
- if (SGPB_JS_PACKAGES.extensions['advanced-closing'] && !SGPBPopup.varToBool(popupData['sgpb-enable-popup-overlay'])) {
1032
- popupData['sgpb-enable-popup-overlay'] = false;
1033
  }
1034
 
1035
-
1036
  popupConfig.magicCall('setOverlayVisible', SGPBPopup.varToBool(popupData['sgpb-enable-popup-overlay']));
1037
  if (SGPBPopup.varToBool(popupData['sgpb-enable-popup-overlay'])) {
1038
  popupConfig.magicCall('setOverlayAddClass', overlayClasses + ' ' + popupData['sgpb-overlay-custom-class']);
@@ -1234,7 +1200,7 @@ SGPBPopup.prototype.popupTriggeringListeners = function()
1234
  jQuery('.sgpb-theme-1-overlay').css({'background-image': 'none'});
1235
  }
1236
  if (SGPBPopup.varToBool(disablePageScrolling)) {
1237
- jQuery('html').addClass('sgpb-overflow-hidden');
1238
  }
1239
  });
1240
 
@@ -1596,7 +1562,7 @@ SGPBPopup.prototype.setPopupDimensions = function()
1596
  popupConfig.magicCall('setMinHeight', minHeight);
1597
 
1598
  if (popupType == 'image') {
1599
- if (popupData['sgpb-image-data']) {
1600
  popupConfig.magicCall('setContentBackgroundImage', 'data:image/png;base64,'+popupData['sgpb-image-data']);
1601
  }
1602
  else {
@@ -2104,16 +2070,30 @@ SGPBPopup.setCookie = function(cName, cValue, exDays, cPageLevel)
2104
  }
2105
 
2106
  if (cPageLevel && typeof cPageLevel != 'boolean') {
2107
- cookiePageLevel = 'path=' + cPageLevel + ';';
2108
  }
2109
  if (!cookieExpirationData) {
2110
  expires = '';
2111
  }
2112
 
 
 
 
 
 
2113
  var value = cValue+((exDays == null) ? ';' : '; '+expires+';'+cookiePageLevel);
2114
  document.cookie = cName + '=' + value;
2115
  };
2116
 
 
 
 
 
 
 
 
 
 
2117
  SGPBPopup.getCookie = function(cName)
2118
  {
2119
  var name = cName + '=';
13
  this.id = null;
14
  this.eventName = '';
15
  this.popupData = null;
16
+ this.additionalPopupData = {};
17
  this.popupConfig = {};
18
  this.popupObj = null;
19
  this.onceListener();
57
 
58
  SGPBPopup.listeners = function () {
59
  var that = this;
60
+
61
+ sgAddEvent(window, 'sgpbPopupBuilderAdditionalDimensionSettings', function(e) {
62
+ SGPBPopup.mobileSafariAdditionalSettings(e);
63
+ });
64
+
65
  sgAddEvent(window, 'sgpbDidOpen', function(e) {
66
+ SGPBPopup.mobileSafariAdditionalSettings(e);
67
  var args = e.detail;
68
  var popupOptions = args.popupData;
69
 
99
  }, 600);
100
  };
101
 
102
+ SGPBPopup.mobileSafariAdditionalSettings = function(e)
103
+ {
104
+ if (typeof e == 'undefined') {
105
+ var args = SGPBPopup.prototype.getAdditionalPopupData();
106
+ if (typeof args == 'undefined') {
107
+ return false;
108
+ }
109
+ var popupOptions = args.popupData;
110
+ var popupId = parseInt(args.popupId);
111
+ }
112
+ else {
113
+ var args = e.detail;
114
+ var alreadySavedArgs = SGPBPopup.prototype.getAdditionalPopupData();
115
+ if (jQuery.isEmptyObject(alreadySavedArgs)) {
116
+ SGPBPopup.prototype.setAdditionalPopupData(args);
117
+ }
118
+ var popupOptions = args.popupData;
119
+ var popupId = parseInt(args.popupId);
120
+ }
121
+ var userAgent = window.navigator.userAgent;
122
+ if (userAgent.match(/iPad/i) || userAgent.match(/iPhone/i)) {
123
+ if (typeof popupOptions['sgpb-popup-dimension-mode'] != 'undefined' && popupOptions['sgpb-popup-dimension-mode'] == 'responsiveMode') {
124
+ var openedPopupWidth = parseInt(window.innerHeight-100);
125
+ if (jQuery('.sgpb-popup-builder-content-'+popupId +' iframe').length) {
126
+ jQuery('.sgpb-popup-builder-content-'+popupId).attr('style', 'height:'+openedPopupWidth+'px !important;');
127
+ }
128
+ }
129
+ }
130
+ }
131
+
132
+ SGPBPopup.prototype.setAdditionalPopupData = function(additionalPopupData)
133
+ {
134
+ this.additionalPopupData = additionalPopupData;
135
+ };
136
+
137
+ SGPBPopup.prototype.getAdditionalPopupData = function()
138
+ {
139
+ return this.additionalPopupData;
140
+ };
141
+
142
  SGPBPopup.prototype.setCountPopupOpen = function(countPopupOpen)
143
  {
144
  this.countPopupOpen = countPopupOpen;
678
  return result;
679
  }
680
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
681
  SGPBPopup.prototype.themeCreator = function()
682
  {
683
  var noPositionSelected = false;
703
  var closeButtonImage = popupConfig.closeButtonImage;
704
  var themeNumber = 1;
705
  var backgroundColor = 'black';
706
+ var borderColor = 'inherit';
707
  var recentSalesPopup = false;
708
  if (typeof SgpbRecentSalesPopupType != 'undefined') {
709
  if (popupType == SgpbRecentSalesPopupType) {
711
  popupTheme = 'sgpb-theme-2';
712
  closeButtonPosition = 'topRight';
713
  backgroundColor = 'white';
714
+ borderColor = '#ececec';
715
  top = '-10';
716
  right = '-10';
717
+ popupConfig.magicCall('setShadowSpread', 1);
718
  popupConfig.magicCall('setContentShadowBlur', 5);
719
  popupConfig.magicCall('setOverlayVisible', false);
720
+ popupConfig.magicCall('setContentShadowColor', '#000000b3');
721
+ popupConfig.magicCall('setContentBorderRadius', '5px');
722
  }
723
  }
724
  var themeIndexNum = popupTheme[popupTheme.length -1];
775
  popupConfig.magicCall('setButtonInside', false);
776
  popupConfig.magicCall('setContentBorderWidth', 1);
777
  popupConfig.magicCall('setContentBackgroundColor', backgroundColor);
778
+ popupConfig.magicCall('setContentBorderColor', borderColor);
779
  popupConfig.magicCall('setOverlayColor', 'white');
780
  var rightPosition = '0';
781
  var topPosition = '-' + closeButtonHeight + 'px';
987
  }
988
 
989
  var overlayClasses = popupTheme+'-overlay sgpb-popup-overlay-'+popupId;
990
+ if (SGPB_JS_PACKAGES.extensions['advanced-closing']) {
991
+ if (typeof popupData['sgpb-enable-popup-overlay'] != 'undefined' && popupData['sgpb-enable-popup-overlay'] == 'on') {
992
+ popupData['sgpb-enable-popup-overlay'] = true;
993
+ }
994
+ else if (typeof popupData['sgpb-enable-popup-overlay'] == 'undefined') {
995
+ popupData['sgpb-enable-popup-overlay'] = false;
996
+ }
997
  }
998
+ else {
999
+ popupData['sgpb-enable-popup-overlay'] = true;
1000
  }
1001
 
 
1002
  popupConfig.magicCall('setOverlayVisible', SGPBPopup.varToBool(popupData['sgpb-enable-popup-overlay']));
1003
  if (SGPBPopup.varToBool(popupData['sgpb-enable-popup-overlay'])) {
1004
  popupConfig.magicCall('setOverlayAddClass', overlayClasses + ' ' + popupData['sgpb-overlay-custom-class']);
1200
  jQuery('.sgpb-theme-1-overlay').css({'background-image': 'none'});
1201
  }
1202
  if (SGPBPopup.varToBool(disablePageScrolling)) {
1203
+ jQuery('html, body').addClass('sgpb-overflow-hidden');
1204
  }
1205
  });
1206
 
1562
  popupConfig.magicCall('setMinHeight', minHeight);
1563
 
1564
  if (popupType == 'image') {
1565
+ if (popupData['sgpb-image-data'] && popupData['sgpb-image-data'].indexOf('http') == -1) {
1566
  popupConfig.magicCall('setContentBackgroundImage', 'data:image/png;base64,'+popupData['sgpb-image-data']);
1567
  }
1568
  else {
2070
  }
2071
 
2072
  if (cPageLevel && typeof cPageLevel != 'boolean') {
2073
+ cookiePageLevel = 'path=' + cPageLevel;
2074
  }
2075
  if (!cookieExpirationData) {
2076
  expires = '';
2077
  }
2078
 
2079
+ /* in IE there is no need to specify the path */
2080
+ if (SGPBPopup.isIE()) {
2081
+ cookiePageLevel = '';
2082
+ }
2083
+
2084
  var value = cValue+((exDays == null) ? ';' : '; '+expires+';'+cookiePageLevel);
2085
  document.cookie = cName + '=' + value;
2086
  };
2087
 
2088
+ SGPBPopup.isIE = function()
2089
+ {
2090
+ ua = navigator.userAgent;
2091
+ /* MSIE used to detect old browsers and Trident used to newer ones*/
2092
+ var isIe = ua.indexOf('MSIE ') > -1 || ua.indexOf('Trident/') > -1;
2093
+
2094
+ return isIe;
2095
+ };
2096
+
2097
  SGPBPopup.getCookie = function(cName)
2098
  {
2099
  var name = cName + '=';
public/views/conditionsView.php CHANGED
@@ -113,6 +113,61 @@ $defaultConditions = $defaultData['freeConditions'];
113
  </a>
114
  </div>
115
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  <div class="row">
117
  <div class="col-md-3">
118
  <label><?php _e('Condition', SG_POPUP_TEXT_DOMAIN);?></label>
113
  </a>
114
  </div>
115
  </div>
116
+ <div class="row">
117
+ <div class="col-md-3">
118
+ <label><?php _e('Condition', SG_POPUP_TEXT_DOMAIN);?></label>
119
+ </div>
120
+ <div class="col-md-3">
121
+ <label><?php _e('Rule', SG_POPUP_TEXT_DOMAIN);?></label>
122
+ </div>
123
+ <div class="col-md-3">
124
+ <label><?php _e('Add the url', SG_POPUP_TEXT_DOMAIN);?></label>
125
+ </div>
126
+ </div>
127
+ <div class="row form-group">
128
+ <div class="col-md-3">
129
+ <?php echo AdminHelper::createSelectBox($defaultConditions, 'detect-by-url', array('class' => 'js-sg-select2')); ?>
130
+ </div>
131
+ <div class="col-md-3">
132
+ <?php echo AdminHelper::createSelectBox(array('starts-with' => __('Starts with', SG_POPUP_TEXT_DOMAIN)), 'starts-with', array('class' => 'js-sg-select2')); ?>
133
+ </div>
134
+ <div class="col-md-3">
135
+ <input type="text" class="sgpb-full-width-events form-control" value="<?php _e('https://', SG_POPUP_TEXT_DOMAIN);?>">
136
+ </div>
137
+ <div class="col-md-3">
138
+ <a href="<?php echo SG_POPUP_ADVANCED_TARGETING_URL;?>" target="_blank" class="btn btn-warning btn-xs sgpb-advanced-targeting-pro-label">
139
+ <?php _e('UNLOCK OPTION', SG_POPUP_TEXT_DOMAIN);?>
140
+ </a>
141
+ </div>
142
+ </div>
143
+ <div class="row">
144
+ <div class="col-md-3">
145
+ <label><?php _e('Condition', SG_POPUP_TEXT_DOMAIN);?></label>
146
+ </div>
147
+ <div class="col-md-3">
148
+ <label><?php _e('Rule', SG_POPUP_TEXT_DOMAIN);?></label>
149
+ </div>
150
+ <div class="col-md-3">
151
+ <label><?php _e('Add cookie name', SG_POPUP_TEXT_DOMAIN);?></label>
152
+ </div>
153
+ </div>
154
+ <div class="row form-group">
155
+ <div class="col-md-3">
156
+ <?php echo AdminHelper::createSelectBox($defaultConditions, 'cookie-detection', array('class' => 'js-sg-select2')); ?>
157
+ </div>
158
+ <div class="col-md-3">
159
+ <?php echo AdminHelper::createSelectBox(array('contains' => __('Contains', SG_POPUP_TEXT_DOMAIN)), 'contains', array('class' => 'js-sg-select2')); ?>
160
+ </div>
161
+ <div class="col-md-3">
162
+ <input type="text" class="sgpb-full-width-events form-control" placeholder="<?php _e('your_cookie_here', SG_POPUP_TEXT_DOMAIN);?>">
163
+ </div>
164
+ <div class="col-md-3">
165
+ <a href="<?php echo SG_POPUP_ADVANCED_TARGETING_URL;?>" target="_blank" class="btn btn-warning btn-xs sgpb-advanced-targeting-pro-label">
166
+ <?php _e('UNLOCK OPTION', SG_POPUP_TEXT_DOMAIN);?>
167
+ </a>
168
+ </div>
169
+ </div>
170
+
171
  <div class="row">
172
  <div class="col-md-3">
173
  <label><?php _e('Condition', SG_POPUP_TEXT_DOMAIN);?></label>
public/views/options/subscription.php CHANGED
@@ -350,6 +350,14 @@
350
  <input type="text" class="form-control sgpb-full-width-events" name="sgpb-subs-invalid-message" value="<?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-subs-invalid-message')); ?>">
351
  </div>
352
  </div>
 
 
 
 
 
 
 
 
353
  <!-- submit styles end -->
354
  <div class="row form-group">
355
  <label class="col-md-12 control-label sgpb-static-padding-top">
350
  <input type="text" class="form-control sgpb-full-width-events" name="sgpb-subs-invalid-message" value="<?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-subs-invalid-message')); ?>">
351
  </div>
352
  </div>
353
+ <div class="row form-group">
354
+ <label class="col-md-6 control-label sgpb-static-padding-top" for="sgpb-subs-show-form-to-top">
355
+ <?php _e('Show form on the Top', SG_POPUP_TEXT_DOMAIN); ?>:
356
+ </label>
357
+ <div class="col-md-6">
358
+ <input type="checkbox" id="sgpb-subs-show-form-to-top" name="sgpb-subs-show-form-to-top" <?php echo esc_attr($popupTypeObj->getOptionValue('sgpb-subs-show-form-to-top')); ?>>
359
+ </div>
360
+ </div>
361
  <!-- submit styles end -->
362
  <div class="row form-group">
363
  <label class="col-md-12 control-label sgpb-static-padding-top">
public/views/popupTypes.php CHANGED
@@ -28,6 +28,24 @@ $labels = $SGPB_POPUP_TYPES['typeLabels'];
28
  </div>
29
  <?php endif; ?>
30
  <div class="sgpb-wrapper">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  <?php foreach ($popupTypes as $popupType): ?>
32
  <?php $type = $popupType->getName(); ?>
33
  <?php
@@ -78,6 +96,7 @@ $labels = $SGPB_POPUP_TYPES['typeLabels'];
78
  </div>
79
  </a>
80
  </div>
 
81
  <?php
82
  $extensions = AdminHelper::getAllExtensions();
83
  if (!empty($extensions['noActive'])) : ?>
@@ -92,6 +111,9 @@ if (!empty($extensions['noActive'])) : ?>
92
  </div>
93
  </div>
94
  <?php foreach ($extensions['noActive'] as $extension) : ?>
 
 
 
95
  <?php
96
  $URL = '';
97
  if (!empty($extension['url'])) {
28
  </div>
29
  <?php endif; ?>
30
  <div class="sgpb-wrapper">
31
+ <?php
32
+ $extensions = AdminHelper::getAllFreeExtensions();
33
+ foreach ($extensions['noActive'] as $extension) : ?>
34
+ <?php
35
+ $URL = '';
36
+ if (!empty($extension['url'])) {
37
+ $URL = $extension['url'];
38
+ }
39
+ $type = $extension['key'];
40
+ ?>
41
+ <a class="create-popup-link popups-div sgpb-<?php echo $type; ?>-div" href="<?php echo esc_attr($URL); ?>" target="_blank">
42
+ <div class="sgpb-type-icon <?php echo $type; ?>-popup-pro"></div>
43
+ <div class="sgpb-type-text-wrapper">
44
+ <p class="sgpb-type-text"><?php echo ucfirst($extension['label']); ?></p>
45
+ </div>
46
+ <div class="sgpb-popup-type-free-pro-ribbon"></div>
47
+ </a>
48
+ <?php endforeach; ?>
49
  <?php foreach ($popupTypes as $popupType): ?>
50
  <?php $type = $popupType->getName(); ?>
51
  <?php
96
  </div>
97
  </a>
98
  </div>
99
+
100
  <?php
101
  $extensions = AdminHelper::getAllExtensions();
102
  if (!empty($extensions['noActive'])) : ?>
111
  </div>
112
  </div>
113
  <?php foreach ($extensions['noActive'] as $extension) : ?>
114
+ <?php if (isset($extension['availability']) && $extension['availability'] == 'free'): ?>
115
+ <?php continue; ?>
116
+ <?php endif; ?>
117
  <?php
118
  $URL = '';
119
  if (!empty($extension['url'])) {
readme.txt CHANGED
@@ -7,9 +7,9 @@ Plugin URI: https://popup-builder.com
7
  Donate link: https://popup-builder.com
8
  Tags: popup, pop up, wordpress popup, popup maker, exit popup, popup builder, wordpress popup plugin
9
  Requires at least: 3.8
10
- Tested up to: 5.1
11
  Requires PHP: 5.3.3
12
- Stable tag: 3.1.9
13
  License: GPLv2 or later
14
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
15
 
@@ -56,6 +56,7 @@ https://www.youtube.com/watch?v=-wFDJDjczeY
56
  * Shortcode popup
57
  * Subscription popup - this type provides the easiest way to create an efficient connection between users and your website through subscription popup. With this simple popup solution, you can quickly collect subscribers in a very pleasant and elegant way. With our newsletter module you can easily send mass mailings.
58
  * Newsletter - send marketing campaings right from popup builder
 
59
 
60
  **Popup Builder - 3rd party supported plugins:**
61
 
@@ -84,6 +85,8 @@ With Popup Builder plugin you can insert any type of content, right into your Po
84
 
85
  * Registration popup - open registration form inside the popup.
86
 
 
 
87
  * Iframe popup - you can set the URL you want to load within an iframe and the popup will load that iframe.
88
 
89
  * Autoresponder (subscription plus extension) - send targeted emails right after the visitor subscribes to your newsletter. You can send coupon codes or download links.
@@ -182,6 +185,18 @@ Go to the Popup Builder settings and set your desired options.
182
 
183
  == Changelog ==
184
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  = Version 3.1.9 =
186
  * Bug fixed related to paths of the Popup Builder resources.
187
  * Select2 ui bugs.
@@ -976,7 +991,7 @@ Leave us a good review :)
976
 
977
  == Upgrade Notice ==
978
 
979
- Current Version of Popup Builder is 3.1.7
980
 
981
  == Other Notes ==
982
 
7
  Donate link: https://popup-builder.com
8
  Tags: popup, pop up, wordpress popup, popup maker, exit popup, popup builder, wordpress popup plugin
9
  Requires at least: 3.8
10
+ Tested up to: 5.2
11
  Requires PHP: 5.3.3
12
+ Stable tag: 3.2
13
  License: GPLv2 or later
14
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
15
 
56
  * Shortcode popup
57
  * Subscription popup - this type provides the easiest way to create an efficient connection between users and your website through subscription popup. With this simple popup solution, you can quickly collect subscribers in a very pleasant and elegant way. With our newsletter module you can easily send mass mailings.
58
  * Newsletter - send marketing campaings right from popup builder
59
+ * PDF popup
60
 
61
  **Popup Builder - 3rd party supported plugins:**
62
 
85
 
86
  * Registration popup - open registration form inside the popup.
87
 
88
+ * Web Push Notification popup - run effective marketing campaings through web push notifications.
89
+
90
  * Iframe popup - you can set the URL you want to load within an iframe and the popup will load that iframe.
91
 
92
  * Autoresponder (subscription plus extension) - send targeted emails right after the visitor subscribes to your newsletter. You can send coupon codes or download links.
185
 
186
  == Changelog ==
187
 
188
+ = Version 3.2 =
189
+ * New Feature: PDF popup type.
190
+ * New Feature: Popup content can be set at the top and bottom of Subscription form.
191
+ * Admin panel and frontend speed improvements.
192
+ * Speed improvements for Multisite.
193
+ * Bug fixed related to popup overlay turning on/off functionality.
194
+ * Improvements for Apple devices (page scrolling, popup dimensions, etc).
195
+ * Big fixed for Internet Explorer related to popup showing limitations.
196
+ * Unstoppable scroll bug fixed when there is a LastPass browser extension.
197
+ * Add improvements for Page builders.
198
+ * Add UTF-8 support for Newsletters.
199
+
200
  = Version 3.1.9 =
201
  * Bug fixed related to paths of the Popup Builder resources.
202
  * Select2 ui bugs.
991
 
992
  == Upgrade Notice ==
993
 
994
+ Current Version of Popup Builder is 3.2
995
 
996
  == Other Notes ==
997