Popup Builder – Responsive WordPress Pop up - Version 3.69

Version Description

Current Version of Popup Builder is 3.69

Download this release

Release Info

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

Code changes from version 3.68.5.2 to 3.69

com/classes/Actions.php CHANGED
@@ -57,10 +57,34 @@ class Actions
57
  add_action('pre_get_posts', array($this, 'preGetPosts'));
58
  add_action('template_redirect', array($this, 'redirectFromPopupPage'));
59
  add_filter('views_edit-popupbuilder', array($this, 'mainActionButtons'), 10, 1);
 
60
  new SGPBFeedback();
61
  new Ajax();
62
  }
63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  public function deletePopup($newStatus, $oldStatus, $post)
65
  {
66
  $currentPostType = AdminHelper::getCurrentPostType();
57
  add_action('pre_get_posts', array($this, 'preGetPosts'));
58
  add_action('template_redirect', array($this, 'redirectFromPopupPage'));
59
  add_filter('views_edit-popupbuilder', array($this, 'mainActionButtons'), 10, 1);
60
+ add_action('wpml_loaded', array($this, 'wpmlRelatedActions'));
61
  new SGPBFeedback();
62
  new Ajax();
63
  }
64
 
65
+ public function wpmlRelatedActions()
66
+ {
67
+ // The actions below will be executed right after WPML is fully configured and loaded.
68
+ add_action('admin_head', array($this, 'removeUnneededMetaboxesFromPopups'), 10);
69
+ }
70
+
71
+ public function removeUnneededMetaboxesFromPopups()
72
+ {
73
+ if (isset($_GET['post_type']) && $_GET['post_type'] == SG_POPUP_POST_TYPE) {
74
+ $exlcudeTrPopupTypes = array(
75
+ 'image',
76
+ 'video',
77
+ 'iframe',
78
+ 'recentSales',
79
+ 'pdf'
80
+ );
81
+ $exlcudeTrPopupTypes = apply_filters('sgpbNoMcePopupTypes', $exlcudeTrPopupTypes);
82
+ if (isset($_GET['sgpb_type']) && in_array($_GET['sgpb_type'], $exlcudeTrPopupTypes)) {
83
+ remove_meta_box('icl_div', SG_POPUP_POST_TYPE, 'side');
84
+ }
85
+ }
86
+ }
87
+
88
  public function deletePopup($newStatus, $oldStatus, $post)
89
  {
90
  $currentPostType = AdminHelper::getCurrentPostType();
com/classes/Ajax.php CHANGED
@@ -307,6 +307,7 @@ class Ajax
307
  public function saveImportedSubscribers()
308
  {
309
  check_ajax_referer(SG_AJAX_NONCE, 'nonce');
 
310
  $formId = (int)sanitize_text_field($_POST['popupSubscriptionList']);
311
  $fileURL = sanitize_text_field($_POST['importListURL']);
312
  $mapping = $_POST['namesMapping'];
@@ -324,8 +325,12 @@ class Ajax
324
  global $wpdb;
325
  $subscribersTableName = $wpdb->prefix.SGPB_SUBSCRIBERS_TABLE_NAME;
326
  $sql = $wpdb->prepare('SELECT submittedData FROM '.$subscribersTableName);
 
 
 
 
327
  if ($sql) {
328
- $sql = $wpdb->prepare('INSERT INTO '.$subscribersTableName.' (firstName, lastName, email, cDate, subscriptionType, status, unsubscribed) VALUES (%s, %s, %s, %s, %d, %d, %d) ', $csvData[$mapping['firstName']], $csvData[$mapping['lastName']], $csvData[$mapping['email']], $csvData[$mapping['date']], $formId, 0, 0);
329
  }
330
  else {
331
  $sql = $wpdb->prepare('INSERT INTO '.$subscribersTableName.' (firstName, lastName, email, cDate, subscriptionType, status, unsubscribed, submittedData) VALUES (%s, %s, %s, %s, %d, %d, %d, %s) ', $csvData[$mapping['firstName']], $csvData[$mapping['lastName']], $csvData[$mapping['email']], $csvData[$mapping['date']], $formId, 0, 0, '');
307
  public function saveImportedSubscribers()
308
  {
309
  check_ajax_referer(SG_AJAX_NONCE, 'nonce');
310
+ @ini_set('auto_detect_line_endings', '1');
311
  $formId = (int)sanitize_text_field($_POST['popupSubscriptionList']);
312
  $fileURL = sanitize_text_field($_POST['importListURL']);
313
  $mapping = $_POST['namesMapping'];
325
  global $wpdb;
326
  $subscribersTableName = $wpdb->prefix.SGPB_SUBSCRIBERS_TABLE_NAME;
327
  $sql = $wpdb->prepare('SELECT submittedData FROM '.$subscribersTableName);
328
+ if (!empty($mapping['date'])) {
329
+ $date = $csvData[$mapping['date']];
330
+ $date = date('Y-m-d', strtotime($date));
331
+ }
332
  if ($sql) {
333
+ $sql = $wpdb->prepare('INSERT INTO '.$subscribersTableName.' (firstName, lastName, email, cDate, subscriptionType, status, unsubscribed) VALUES (%s, %s, %s, %s, %d, %d, %d) ', $csvData[$mapping['firstName']], $csvData[$mapping['lastName']], $csvData[$mapping['email']], $date, $formId, 0, 0);
334
  }
335
  else {
336
  $sql = $wpdb->prepare('INSERT INTO '.$subscribersTableName.' (firstName, lastName, email, cDate, subscriptionType, status, unsubscribed, submittedData) VALUES (%s, %s, %s, %s, %d, %d, %d, %s) ', $csvData[$mapping['firstName']], $csvData[$mapping['lastName']], $csvData[$mapping['email']], $csvData[$mapping['date']], $formId, 0, 0, '');
com/classes/ConditionCreator.php CHANGED
@@ -292,7 +292,7 @@ class ConditionCreator
292
  return '';
293
  }
294
 
295
- private static function getRuleElementData($conditionDataObj, $ruleName)
296
  {
297
  global $SGPB_DATA_CONFIG_ARRAY;
298
  $ruleElementData = array();
@@ -309,7 +309,7 @@ class ConditionCreator
309
  $savedParam = $saveData[$ruleName];
310
  }
311
  else if (!empty($saveData['hiddenOption'])) {
312
- $savedParam = @$saveData['hiddenOption'][$ruleName];
313
  }
314
 
315
  $ruleElementData['ruleName'] = $ruleName;
292
  return '';
293
  }
294
 
295
+ private static function getRuleElementData($conditionDataObj, $ruleName = '')
296
  {
297
  global $SGPB_DATA_CONFIG_ARRAY;
298
  $ruleElementData = array();
309
  $savedParam = $saveData[$ruleName];
310
  }
311
  else if (!empty($saveData['hiddenOption'])) {
312
+ $savedParam = $saveData['hiddenOption'][$ruleName];
313
  }
314
 
315
  $ruleElementData['ruleName'] = $ruleName;
com/classes/Filters.php CHANGED
@@ -50,10 +50,25 @@ class Filters
50
  add_filter('sgpbSystemInformation', array($this, 'systemInformation'), 10, 1);
51
  add_filter('plugin_action_links', array($this, 'pluginActionLinks'), 10, 4);
52
  add_filter('plugin_row_meta', array( $this, 'pluginRowMetas'), 10, 4);
53
- add_filter( 'rank_math/sitemap/exclude_post_type', array($this, 'excludeRankMath'), 10, 2 );
54
  add_filter('sgpbUserSelectionQuery', array($this, 'userSelectionQueryAddExtraAttributes'), 100, 1);
55
  add_filter('sgpbFilterOptionsBeforeSaving', array($this, 'filterOptionsBeforeSaving'), 100, 1);
56
  add_filter('sgpbPopupExtraData', array($this, 'popupExtraDataRender'), 100, 2);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  }
58
 
59
  public function popupExtraDataRender($popupId = 0, $popupOptions = array())
@@ -94,7 +109,7 @@ class Filters
94
  $buttonStyles .= 'color: '.$popupOptions['sgpb-floating-button-text-color'].';';
95
  }
96
 
97
- $floatingButton = '<button class="'.$buttonClass.' sgpb-floating-button sg-popup-id-'.$popupId.'" style="'.$buttonStyles.'">'.$popupOptions['sgpb-floating-button-text'].'</button>';
98
 
99
  echo $floatingButton;
100
  }
50
  add_filter('sgpbSystemInformation', array($this, 'systemInformation'), 10, 1);
51
  add_filter('plugin_action_links', array($this, 'pluginActionLinks'), 10, 4);
52
  add_filter('plugin_row_meta', array( $this, 'pluginRowMetas'), 10, 4);
53
+ add_filter('rank_math/sitemap/exclude_post_type', array($this, 'excludeRankMath'), 10, 2);
54
  add_filter('sgpbUserSelectionQuery', array($this, 'userSelectionQueryAddExtraAttributes'), 100, 1);
55
  add_filter('sgpbFilterOptionsBeforeSaving', array($this, 'filterOptionsBeforeSaving'), 100, 1);
56
  add_filter('sgpbPopupExtraData', array($this, 'popupExtraDataRender'), 100, 2);
57
+ add_filter('wpml_link_to_translation', array($this, 'linkToTranslationWpml'), 30, 4);
58
+ }
59
+
60
+ public function linkToTranslationWpml($link, $postId, $lang, $trid)
61
+ {
62
+ if (strpos($link, SG_POPUP_POST_TYPE) && strpos($link, 'source_lang') && isset($trid)) {
63
+ $popupType = 'html';
64
+ $popup = SGPopup::find($postId);
65
+ if (!empty($popup) || !is_object($popup)) {
66
+ $popupType = $popup->getType();
67
+ }
68
+ $link .= '&sgpb_type='.$popupType;
69
+ }
70
+
71
+ return $link;
72
  }
73
 
74
  public function popupExtraDataRender($popupId = 0, $popupOptions = array())
109
  $buttonStyles .= 'color: '.$popupOptions['sgpb-floating-button-text-color'].';';
110
  }
111
 
112
+ $floatingButton = '<button class="'.$buttonClass.' sgpb-floating-button sg-popup-id-'.$popupId.'" style="'.$buttonStyles.'"><span class="sgpb-'.$popupOptions['sgpb-floating-button-style'].'-floating-button-text">'.$popupOptions['sgpb-floating-button-text'].'</span></button>';
113
 
114
  echo $floatingButton;
115
  }
com/classes/Javascript.php CHANGED
@@ -30,7 +30,7 @@ class Javascript
30
  $pageName = SG_POPUP_SUBSCRIBERS_PAGE;
31
  }
32
 
33
- $registeredPlugins = AdminHelper::getOption('SG_POPUP_BUILDER_REGISTERED_PLUGINS');
34
 
35
  if(!$registeredPlugins) {
36
  return;
30
  $pageName = SG_POPUP_SUBSCRIBERS_PAGE;
31
  }
32
 
33
+ $registeredPlugins = AdminHelper::getOption(SGPB_POPUP_BUILDER_REGISTERED_PLUGINS);
34
 
35
  if(!$registeredPlugins) {
36
  return;
com/classes/PopupChecker.php CHANGED
@@ -110,8 +110,17 @@ class PopupChecker
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);
@@ -561,6 +570,9 @@ class PopupChecker
561
  if (is_wp_error($postLanguage)) {
562
  return true;
563
  }
 
 
 
564
  if ($postLanguage['language_code'] != $popupLanguage) {
565
  return false;
566
  }
110
  }
111
 
112
  if (!empty($target['forbidden']) && empty($target['permissive'])) {
113
+ $conditions = $this->divideConditionsData();
114
+ $conditions = apply_filters('sgpbFilterDividedConditions', $conditions);
115
+ $isSatisfyForConditions = $this->isSatisfyForConditions($conditions);
116
+
117
+ if ($isSatisfyForConditions === false) {
118
+ return $insertedModes;
119
+ }
120
+ if ($this->isSatisfyForOtherConditions() === false) {
121
+ return $insertedModes;
122
+ }
123
  $insertedModes['option_event'] = true;
 
124
  }
125
 
126
  $isPermissive = $this->isPermissive($target);
570
  if (is_wp_error($postLanguage)) {
571
  return true;
572
  }
573
+ if (!empty($_GET['lang']) && ($_GET['lang'] == $popupLanguage)) {
574
+ return true;
575
+ }
576
  if ($postLanguage['language_code'] != $popupLanguage) {
577
  return false;
578
  }
com/classes/PopupLoader.php CHANGED
@@ -65,7 +65,10 @@ class PopupLoader
65
  $getterId = sgpGetCorrectPopupId($getterId);
66
  }
67
  if ($currentUrl !== false) {
68
- $getterId = $_GET['preview_id'];
 
 
 
69
  }
70
 
71
  $popupFromUrl = SGPopup::find($getterId, $args);
65
  $getterId = sgpGetCorrectPopupId($getterId);
66
  }
67
  if ($currentUrl !== false) {
68
+ $getterId = $previewedPopupId;
69
+ if (isset($_GET['preview_id'])) {
70
+ $getterId = (int)$_GET['preview_id'];
71
+ }
72
  }
73
 
74
  $popupFromUrl = SGPopup::find($getterId, $args);
com/classes/ScriptsLoader.php CHANGED
@@ -161,7 +161,7 @@ class ScriptsLoader
161
  {
162
  global $post;
163
  $popups = $this->getLoadablePopups();
164
- $registeredPlugins = AdminHelper::getOption('SG_POPUP_BUILDER_REGISTERED_PLUGINS');
165
 
166
  if (!$registeredPlugins) {
167
  return;
@@ -261,7 +261,7 @@ class ScriptsLoader
261
  global $post;
262
  $styles = array();
263
  $popups = $this->getLoadablePopups();
264
- $registeredPlugins = AdminHelper::getOption('SG_POPUP_BUILDER_REGISTERED_PLUGINS');
265
 
266
  if (!$registeredPlugins) {
267
  return;
161
  {
162
  global $post;
163
  $popups = $this->getLoadablePopups();
164
+ $registeredPlugins = AdminHelper::getOption(SGPB_POPUP_BUILDER_REGISTERED_PLUGINS);
165
 
166
  if (!$registeredPlugins) {
167
  return;
261
  global $post;
262
  $styles = array();
263
  $popups = $this->getLoadablePopups();
264
+ $registeredPlugins = AdminHelper::getOption(SGPB_POPUP_BUILDER_REGISTERED_PLUGINS);
265
 
266
  if (!$registeredPlugins) {
267
  return;
com/classes/Style.php CHANGED
@@ -32,7 +32,7 @@ class Style
32
  $pageName = SG_POPUP_SUBSCRIBERS_PAGE;
33
  }
34
 
35
- $registeredPlugins = AdminHelper::getOption('SG_POPUP_BUILDER_REGISTERED_PLUGINS');
36
 
37
  if (!$registeredPlugins) {
38
  return;
32
  $pageName = SG_POPUP_SUBSCRIBERS_PAGE;
33
  }
34
 
35
+ $registeredPlugins = AdminHelper::getOption(SGPB_POPUP_BUILDER_REGISTERED_PLUGINS);
36
 
37
  if (!$registeredPlugins) {
38
  return;
com/classes/Updates.php CHANGED
@@ -27,7 +27,7 @@ class Updates
27
 
28
  public function setRegisterdExtensionsLicenses()
29
  {
30
- $registered = AdminHelper::getOption('SG_POPUP_BUILDER_REGISTERED_PLUGINS');
31
  $registered = json_decode($registered, true);
32
 
33
  if (empty($registered)) {
27
 
28
  public function setRegisterdExtensionsLicenses()
29
  {
30
+ $registered = AdminHelper::getOption(SGPB_POPUP_BUILDER_REGISTERED_PLUGINS);
31
  $registered = json_decode($registered, true);
32
 
33
  if (empty($registered)) {
com/classes/extension/SgpbPopupExtension.php CHANGED
File without changes
com/classes/extension/SgpbPopupExtensionRegister.php CHANGED
@@ -6,25 +6,18 @@ class SgpbPopupExtensionRegister
6
  public static function register($pluginName, $classPath, $className, $options = array())
7
  {
8
  $registeredData = array();
9
- $registeredPlugins = AdminHelper::getOption('SG_POPUP_BUILDER_REGISTERED_PLUGINS');
10
 
11
- if(!empty($registeredPlugins)) {
12
- $registeredData = AdminHelper::getOption('SG_POPUP_BUILDER_REGISTERED_PLUGINS');
13
- }
14
-
15
- if (!empty($registeredData)) {
16
  $registeredData = json_decode($registeredData, true);
17
  }
18
 
19
- if(empty($registeredData)) {
20
- $registeredData = array();
21
- }
22
-
23
- if(empty($classPath) || empty($className)) {
24
  if(!empty($registeredData[$pluginName])) {
25
  /*Delete the plugin from the registered plugins' list if the class name or the class path is empty.*/
26
  unset($registeredData[$pluginName]);
27
- AdminHelper::updateOption('SG_POPUP_BUILDER_REGISTERED_PLUGINS', $registeredData);
28
  }
29
 
30
  return;
@@ -37,7 +30,7 @@ class SgpbPopupExtensionRegister
37
  $registeredData[$pluginName] = $pluginData;
38
  $registeredData = json_encode($registeredData);
39
 
40
- AdminHelper::updateOption('SG_POPUP_BUILDER_REGISTERED_PLUGINS', $registeredData);
41
  // it seems we have an inactive extension now
42
  AdminHelper::updateOption('SGPB_INACTIVE_EXTENSIONS', 'inactive');
43
 
@@ -46,7 +39,7 @@ class SgpbPopupExtensionRegister
46
 
47
  public static function remove($pluginName)
48
  {
49
- $registeredPlugins = AdminHelper::getOption('SG_POPUP_BUILDER_REGISTERED_PLUGINS');
50
 
51
  if (!$registeredPlugins) {
52
  return false;
@@ -64,7 +57,7 @@ class SgpbPopupExtensionRegister
64
  unset($registeredData[$pluginName]);
65
  $registeredData = json_encode($registeredData);
66
 
67
- AdminHelper::updateOption('SG_POPUP_BUILDER_REGISTERED_PLUGINS', $registeredData);
68
 
69
  return true;
70
  }
6
  public static function register($pluginName, $classPath, $className, $options = array())
7
  {
8
  $registeredData = array();
9
+ $registeredPlugins = AdminHelper::getOption(SGPB_POPUP_BUILDER_REGISTERED_PLUGINS);
10
 
11
+ if (!empty($registeredPlugins)) {
12
+ $registeredData = $registeredPlugins;
 
 
 
13
  $registeredData = json_decode($registeredData, true);
14
  }
15
 
16
+ if (empty($classPath) || empty($className)) {
 
 
 
 
17
  if(!empty($registeredData[$pluginName])) {
18
  /*Delete the plugin from the registered plugins' list if the class name or the class path is empty.*/
19
  unset($registeredData[$pluginName]);
20
+ AdminHelper::updateOption(SGPB_POPUP_BUILDER_REGISTERED_PLUGINS, $registeredData);
21
  }
22
 
23
  return;
30
  $registeredData[$pluginName] = $pluginData;
31
  $registeredData = json_encode($registeredData);
32
 
33
+ AdminHelper::updateOption(SGPB_POPUP_BUILDER_REGISTERED_PLUGINS, $registeredData);
34
  // it seems we have an inactive extension now
35
  AdminHelper::updateOption('SGPB_INACTIVE_EXTENSIONS', 'inactive');
36
 
39
 
40
  public static function remove($pluginName)
41
  {
42
+ $registeredPlugins = AdminHelper::getOption(SGPB_POPUP_BUILDER_REGISTERED_PLUGINS);
43
 
44
  if (!$registeredPlugins) {
45
  return false;
57
  unset($registeredData[$pluginName]);
58
  $registeredData = json_encode($registeredData);
59
 
60
+ AdminHelper::updateOption(SGPB_POPUP_BUILDER_REGISTERED_PLUGINS, $registeredData);
61
 
62
  return true;
63
  }
com/classes/popups/ImagePopup.php CHANGED
@@ -77,7 +77,9 @@ class ImagePopup extends SGPopup
77
  $id = $this->getId();
78
  $imageUrl = $this->getOptionValue('sgpb-image-url');
79
 
80
- return '<img width="1" height="1" class="sgpb-preloaded-image-'.$id.'" src="'.$imageUrl.'" style="position:absolute;right:9999999999999px;">';
 
 
81
  }
82
 
83
  public function getExtraRenderOptions()
77
  $id = $this->getId();
78
  $imageUrl = $this->getOptionValue('sgpb-image-url');
79
 
80
+ $imageAltText = AdminHelper::getImageAltTextByUrl($imageUrl);
81
+
82
+ return '<img width="1" height="1" class="sgpb-preloaded-image-'.$id.'" alt="'.$imageAltText.'" src="'.$imageUrl.'" style="position:absolute;right:9999999999999px;">';
83
  }
84
 
85
  public function getExtraRenderOptions()
com/classes/popups/SGPopup.php CHANGED
@@ -707,7 +707,10 @@ abstract class SGPopup
707
  $popupOptions = apply_filters('sgpbSavePopupOptions', $popupOptions);
708
  //special code added for "Behavior After Special Events" section
709
  //todo: remove in the future if possible
710
- $specialBehaviors = @$popupOptions['sgpb-behavior-after-special-events'];
 
 
 
711
  if (!empty($specialBehaviors) && is_array($specialBehaviors)) {
712
  foreach ($specialBehaviors as $groupId => $groupRow) {
713
  foreach ($groupRow as $ruleId => $ruleRow) {
707
  $popupOptions = apply_filters('sgpbSavePopupOptions', $popupOptions);
708
  //special code added for "Behavior After Special Events" section
709
  //todo: remove in the future if possible
710
+ $specialBehaviors = array();
711
+ if (empty($popupOptions['sgpb-behavior-after-special-events'])) {
712
+ $specialBehaviors = $popupOptions['sgpb-behavior-after-special-events'];
713
+ }
714
  if (!empty($specialBehaviors) && is_array($specialBehaviors)) {
715
  foreach ($specialBehaviors as $groupId => $groupRow) {
716
  foreach ($groupRow as $ruleId => $ruleRow) {
com/config/config.php CHANGED
@@ -136,7 +136,8 @@ class SgpbPopupConfig
136
  self::addDefine('SGPB_TRANSIENT_POPUPS_LOAD', 'sgpbLoadPopups');
137
  self::addDefine('SGPB_TRANSIENT_POPUPS_TERMS', 'sgpbGetPopupsByTermSlug');
138
  self::addDefine('SGPB_TRANSIENT_POPUPS_ALL_CATEGORIES', 'sgpbGetPostsAllCategories');
139
- self::addDefine('SGPB_REGISTERED_PLUGINS_PATHS_MODIFIED', 'sgpbModifiedRegisteredPluginsPaths1');
 
140
  self::addDefine('SGPB_RATE_US_NOTIFICATION_ID', 'sgpbMainRateUsNotification');
141
  self::addDefine('SGPB_SUPPORT_BANNER_NOTIFICATION_ID', 'sgpbMainSupportBanner');
142
  self::popupTypesInit();
136
  self::addDefine('SGPB_TRANSIENT_POPUPS_LOAD', 'sgpbLoadPopups');
137
  self::addDefine('SGPB_TRANSIENT_POPUPS_TERMS', 'sgpbGetPopupsByTermSlug');
138
  self::addDefine('SGPB_TRANSIENT_POPUPS_ALL_CATEGORIES', 'sgpbGetPostsAllCategories');
139
+ self::addDefine('SGPB_REGISTERED_PLUGINS_PATHS_MODIFIED', 'sgpbModifiedRegisteredPluginsPaths2');
140
+ self::addDefine('SGPB_POPUP_BUILDER_REGISTERED_PLUGINS', 'sgpbPopupBuilderRegisteredPlugins');
141
  self::addDefine('SGPB_RATE_US_NOTIFICATION_ID', 'sgpbMainRateUsNotification');
142
  self::addDefine('SGPB_SUPPORT_BANNER_NOTIFICATION_ID', 'sgpbMainSupportBanner');
143
  self::popupTypesInit();
com/config/configPackage.php CHANGED
@@ -3,6 +3,6 @@ if (!defined('ABSPATH')) {
3
  exit();
4
  }
5
 
6
- define('SG_POPUP_VERSION', '3.68.5.2');
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.69');
7
  define('SGPB_POPUP_PKG', SGPB_POPUP_PKG_FREE);
8
  define('POPUP_BUILDER_BASENAME', 'popupbuilder-platinum/popup-builder.php');
com/config/dataConfig.php CHANGED
File without changes
com/helpers/AdminHelper.php CHANGED
@@ -1380,7 +1380,13 @@ class AdminHelper
1380
  public static function updateOption($optionKey, $optionValue)
1381
  {
1382
  if (is_multisite()) {
1383
- update_site_option($optionKey, $optionValue);
 
 
 
 
 
 
1384
  }
1385
  else {
1386
  update_option($optionKey, $optionValue);
@@ -1389,9 +1395,17 @@ class AdminHelper
1389
 
1390
  public static function getOption($optionKey)
1391
  {
 
1392
  if (is_multisite()) {
1393
- return get_site_option($optionKey);
 
 
 
 
 
 
1394
  }
 
1395
  return get_option($optionKey);
1396
  }
1397
 
@@ -1414,23 +1428,24 @@ class AdminHelper
1414
  */
1415
  public static function makeRegisteredPluginsStaticPathsToDynamic()
1416
  {
1417
- $hasModifiedPaths = AdminHelper::getOption('SGPB_REGISTERED_PLUGINS_PATHS_MODIFIED');
1418
-
 
 
1419
  if ($hasModifiedPaths) {
1420
  return false;
1421
  }
1422
- // remove old outdated option sgpbModifiedRegisteredPluginsPaths
1423
- delete_option('sgpbModifiedRegisteredPluginsPaths');
1424
- update_option(SGPB_REGISTERED_PLUGINS_PATHS_MODIFIED, 1);
1425
-
1426
- $registeredPlugins = AdminHelper::getOption('SG_POPUP_BUILDER_REGISTERED_PLUGINS');
1427
 
 
1428
  if (empty($registeredPlugins)) {
1429
  return false;
1430
  }
1431
 
1432
  $registeredPlugins = json_decode($registeredPlugins, true);
1433
-
1434
  if (empty($registeredPlugins)) {
1435
  return false;
1436
  }
@@ -1446,14 +1461,14 @@ class AdminHelper
1446
  }
1447
  $registeredPlugins = json_encode($registeredPlugins);
1448
 
1449
- update_option('SG_POPUP_BUILDER_REGISTERED_PLUGINS', $registeredPlugins);
1450
  return true;
1451
  }
1452
 
1453
  public static function hasInactiveExtensions()
1454
  {
1455
  $hasInactiveExtensions = false;
1456
- $allRegiseredPBPlugins = AdminHelper::getOption('SG_POPUP_BUILDER_REGISTERED_PLUGINS');
1457
  $allRegiseredPBPlugins = @json_decode($allRegiseredPBPlugins, true);
1458
  if (empty($allRegiseredPBPlugins)) {
1459
  return $hasInactiveExtensions;
@@ -1518,7 +1533,7 @@ class AdminHelper
1518
  public static function removeAllNonPrintableCharacters($title, $defaultValue)
1519
  {
1520
  $titleRes = $title;
1521
- $pattern = '/[\\\^£$%&*()}{@#~?><>,|=_+¬-]/';
1522
  $title = preg_replace($pattern, '', $title);
1523
  $title = mb_ereg_replace($pattern, '', $title);
1524
  $title = htmlspecialchars($title, ENT_IGNORE, 'UTF-8');
@@ -1687,7 +1702,7 @@ class AdminHelper
1687
  }
1688
  }
1689
 
1690
- $registered = AdminHelper::getOption('SG_POPUP_BUILDER_REGISTERED_PLUGINS');
1691
  $registered = json_decode($registered, true);
1692
 
1693
  if (empty($registered)) {
@@ -1862,9 +1877,7 @@ class AdminHelper
1862
  if (isset($_SERVER['HTTP_USER_AGENT'])) {
1863
  $uAgent = $_SERVER['HTTP_USER_AGENT'];
1864
  }
1865
- $bname = 'Unknown';
1866
- $platform = 'Unknown';
1867
- $version= '';
1868
  $browserInfoContent = '';
1869
 
1870
  //First get the platform?
@@ -1880,40 +1893,44 @@ class AdminHelper
1880
 
1881
  if (preg_match('/MSIE/i',$uAgent) && !preg_match('/Opera/i',$uAgent)) {
1882
  $bname = 'Internet Explorer';
1883
- $ub = "MSIE";
1884
  }
1885
  else if (preg_match('/Firefox/i',$uAgent)) {
1886
  $bname = 'Mozilla Firefox';
1887
- $ub = "Firefox";
1888
  }
1889
  else if (preg_match('/OPR/i',$uAgent)) {
1890
  $bname = 'Opera';
1891
- $ub = "Opera";
1892
  }
1893
  else if (preg_match('/Chrome/i',$uAgent) && !preg_match('/Edge/i',$uAgent)) {
1894
  $bname = 'Google Chrome';
1895
- $ub = "Chrome";
1896
  }
1897
  else if (preg_match('/Safari/i',$uAgent) && !preg_match('/Edge/i',$uAgent)) {
1898
  $bname = 'Apple Safari';
1899
- $ub = "Safari";
1900
  }
1901
  else if (preg_match('/Netscape/i',$uAgent)) {
1902
  $bname = 'Netscape';
1903
- $ub = "Netscape";
1904
  }
1905
  else if (preg_match('/Edge/i',$uAgent)) {
1906
  $bname = 'Edge';
1907
- $ub = "Edge";
1908
  }
1909
  else if (preg_match('/Trident/i',$uAgent)) {
1910
  $bname = 'Internet Explorer';
1911
- $ub = "MSIE";
1912
  }
1913
 
1914
  // finally get the correct version number
1915
  $known = array('Version', $ub, 'other');
1916
- $pattern = '#(?<browser>'.join('|', $known).')[/ ]+(?<version>[0-9.|a-zA-Z.]*)#';
 
 
 
 
1917
  // see how many we have
1918
  $i = count($matches['browser']);
1919
  //we will have two since we are not using 'other' argument yet
@@ -2045,6 +2062,7 @@ class AdminHelper
2045
  $mailSubject = $newsletterData['newsletterSubject'];
2046
  $fromEmail = $newsletterData['fromEmail'];
2047
  $emailMessage = $newsletterData['messageBody'];
 
2048
  $headers = array(
2049
  'From: "'.$blogInfo.'" <'.$fromEmail.'>' ,
2050
  'MIME-Version: 1.0' ,
@@ -2070,4 +2088,13 @@ class AdminHelper
2070
 
2071
  wp_die($newsletterData['testSendingStatus']);
2072
  }
 
 
 
 
 
 
 
 
 
2073
  }
1380
  public static function updateOption($optionKey, $optionValue)
1381
  {
1382
  if (is_multisite()) {
1383
+ if ($optionKey == SGPB_POPUP_BUILDER_REGISTERED_PLUGINS && !is_network_admin()) {
1384
+ $blogId = get_current_blog_id();
1385
+ update_network_option($blogId, $optionKey, $optionValue);
1386
+ }
1387
+ else {
1388
+ update_site_option($optionKey, $optionValue);
1389
+ }
1390
  }
1391
  else {
1392
  update_option($optionKey, $optionValue);
1395
 
1396
  public static function getOption($optionKey)
1397
  {
1398
+
1399
  if (is_multisite()) {
1400
+ if ($optionKey == SGPB_POPUP_BUILDER_REGISTERED_PLUGINS && !is_network_admin()) {
1401
+ $blogId = get_current_blog_id();
1402
+ return get_network_option($blogId, $optionKey);
1403
+ }
1404
+ else {
1405
+ return get_site_option($optionKey);
1406
+ }
1407
  }
1408
+
1409
  return get_option($optionKey);
1410
  }
1411
 
1428
  */
1429
  public static function makeRegisteredPluginsStaticPathsToDynamic()
1430
  {
1431
+ // remove old outdated option sgpbModifiedRegisteredPluginsPaths
1432
+ delete_option('sgpbModifiedRegisteredPluginsPaths');
1433
+ delete_option('SG_POPUP_BUILDER_REGISTERED_PLUGINS');
1434
+ $hasModifiedPaths = AdminHelper::getOption(SGPB_REGISTERED_PLUGINS_PATHS_MODIFIED);
1435
  if ($hasModifiedPaths) {
1436
  return false;
1437
  }
1438
+ else {
1439
+ Installer::registerPlugin();
1440
+ }
1441
+ AdminHelper::updateOption(SGPB_REGISTERED_PLUGINS_PATHS_MODIFIED, 1);
 
1442
 
1443
+ $registeredPlugins = AdminHelper::getOption(SGPB_POPUP_BUILDER_REGISTERED_PLUGINS);
1444
  if (empty($registeredPlugins)) {
1445
  return false;
1446
  }
1447
 
1448
  $registeredPlugins = json_decode($registeredPlugins, true);
 
1449
  if (empty($registeredPlugins)) {
1450
  return false;
1451
  }
1461
  }
1462
  $registeredPlugins = json_encode($registeredPlugins);
1463
 
1464
+ AdminHelper::updateOption(SGPB_POPUP_BUILDER_REGISTERED_PLUGINS, $registeredPlugins);
1465
  return true;
1466
  }
1467
 
1468
  public static function hasInactiveExtensions()
1469
  {
1470
  $hasInactiveExtensions = false;
1471
+ $allRegiseredPBPlugins = AdminHelper::getOption(SGPB_POPUP_BUILDER_REGISTERED_PLUGINS);
1472
  $allRegiseredPBPlugins = @json_decode($allRegiseredPBPlugins, true);
1473
  if (empty($allRegiseredPBPlugins)) {
1474
  return $hasInactiveExtensions;
1533
  public static function removeAllNonPrintableCharacters($title, $defaultValue)
1534
  {
1535
  $titleRes = $title;
1536
+ $pattern = '/[\\\^£$%&*()}{@#~?><>,|=_+¬-]/u';
1537
  $title = preg_replace($pattern, '', $title);
1538
  $title = mb_ereg_replace($pattern, '', $title);
1539
  $title = htmlspecialchars($title, ENT_IGNORE, 'UTF-8');
1702
  }
1703
  }
1704
 
1705
+ $registered = AdminHelper::getOption(SGPB_POPUP_BUILDER_REGISTERED_PLUGINS);
1706
  $registered = json_decode($registered, true);
1707
 
1708
  if (empty($registered)) {
1877
  if (isset($_SERVER['HTTP_USER_AGENT'])) {
1878
  $uAgent = $_SERVER['HTTP_USER_AGENT'];
1879
  }
1880
+ $bname = $platform = $ub = $version = 'Unknown';
 
 
1881
  $browserInfoContent = '';
1882
 
1883
  //First get the platform?
1893
 
1894
  if (preg_match('/MSIE/i',$uAgent) && !preg_match('/Opera/i',$uAgent)) {
1895
  $bname = 'Internet Explorer';
1896
+ $ub = 'MSIE';
1897
  }
1898
  else if (preg_match('/Firefox/i',$uAgent)) {
1899
  $bname = 'Mozilla Firefox';
1900
+ $ub = 'Firefox';
1901
  }
1902
  else if (preg_match('/OPR/i',$uAgent)) {
1903
  $bname = 'Opera';
1904
+ $ub = 'Opera';
1905
  }
1906
  else if (preg_match('/Chrome/i',$uAgent) && !preg_match('/Edge/i',$uAgent)) {
1907
  $bname = 'Google Chrome';
1908
+ $ub = 'Chrome';
1909
  }
1910
  else if (preg_match('/Safari/i',$uAgent) && !preg_match('/Edge/i',$uAgent)) {
1911
  $bname = 'Apple Safari';
1912
+ $ub = 'Safari';
1913
  }
1914
  else if (preg_match('/Netscape/i',$uAgent)) {
1915
  $bname = 'Netscape';
1916
+ $ub = 'Netscape';
1917
  }
1918
  else if (preg_match('/Edge/i',$uAgent)) {
1919
  $bname = 'Edge';
1920
+ $ub = 'Edge';
1921
  }
1922
  else if (preg_match('/Trident/i',$uAgent)) {
1923
  $bname = 'Internet Explorer';
1924
+ $ub = 'MSIE';
1925
  }
1926
 
1927
  // finally get the correct version number
1928
  $known = array('Version', $ub, 'other');
1929
+ $pattern = '#(?<browser>'.implode('|', $known).')[/ ]+(?<version>[0-9.|a-zA-Z.]*)#';
1930
+ if (!preg_match_all($pattern, $uAgent, $matches)) {
1931
+ // we have no matching number just continue
1932
+ }
1933
+
1934
  // see how many we have
1935
  $i = count($matches['browser']);
1936
  //we will have two since we are not using 'other' argument yet
2062
  $mailSubject = $newsletterData['newsletterSubject'];
2063
  $fromEmail = $newsletterData['fromEmail'];
2064
  $emailMessage = $newsletterData['messageBody'];
2065
+ $blogInfo = get_bloginfo();
2066
  $headers = array(
2067
  'From: "'.$blogInfo.'" <'.$fromEmail.'>' ,
2068
  'MIME-Version: 1.0' ,
2088
 
2089
  wp_die($newsletterData['testSendingStatus']);
2090
  }
2091
+
2092
+ // wp uploaded images
2093
+ public static function getImageAltTextByUrl($imageUrl = '')
2094
+ {
2095
+ $imageId = attachment_url_to_postid($imageUrl);
2096
+ $altText = get_post_meta($imageId, '_wp_attachment_image_alt', true);
2097
+
2098
+ return $altText;
2099
+ }
2100
  }
com/helpers/ConfigDataHelper.php CHANGED
File without changes
com/helpers/Functions.php CHANGED
File without changes
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.68.5.2
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.69
7
  * Author: Sygnoos
8
  * Author URI: https://sygnoos.com
9
  * License: GPLv2
public/css/ResetFormStyle.css CHANGED
@@ -24,5 +24,5 @@ textarea{vertical-align:top;overflow:auto}.sgpb-form-wrapper select[multiple]{ve
24
  .sgpb-form-wrapper input[type="submit"],
25
  .sgpb-form-wrapper input[type="button"]{max-width:100% !important;padding:10px
26
  !important;box-sizing:border-box;font-size:14px !important;box-shadow:none !important;margin:5px
27
- auto !important;display:inline-block !important;font-weight:bold !important;background-image:none !important}.sgpb-form-wrapper input[type="submit"],
28
  .sgpb-form-wrapper input[type="button"]{line-height:0.4 !important;font-size:18px !important}.sg-js-hide{display:none}
24
  .sgpb-form-wrapper input[type="submit"],
25
  .sgpb-form-wrapper input[type="button"]{max-width:100% !important;padding:10px
26
  !important;box-sizing:border-box;font-size:14px !important;box-shadow:none !important;margin:5px
27
+ auto !important;display:inline-block !important;font-weight:bold !important;background-image:none !important;line-height:normal !important}.sgpb-form-wrapper input[type="submit"],
28
  .sgpb-form-wrapper input[type="button"]{line-height:0.4 !important;font-size:18px !important}.sg-js-hide{display:none}
public/css/popupAdminStyles.css CHANGED
File without changes
public/css/theme.css CHANGED
@@ -168,4 +168,5 @@ slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,
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+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8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yms6KEi0QxWbAJU4KS7HVvBBzp7aMJDFkTKptAICnGAwAALCxodmzlAoQWEuAxNix0tSyXSvi7dtoc9kK5eDVLtxnedmC8HsXcOC2Hwj/dXZ474a+fqHJnVs3crTJiCsvRsu58yKRWTUUMFB2m4DTpzUMWL3aNGrUGFjL1vYadegJImW3xlag9unbEgzo3o3Nt4DSCgz8bpBbN23fMGsDHe4aNgPjYJ13Q74AOzzv78CHly7vtefz6NOrX8++vfv38OPLn0+/vv37+PPr38+/v///ZAAGKOCABBZo4IEIJqjgggw26OCDEEYo4YQUVmjhhRhmqOGGHHbo4YcghijiiCSWaOKJKKao4oostujiizDGKOOMNNZo44045qjjjjz26OOPQAYp5JBEFmnkkUgmqeSSTDbJYwIAOw==') center center no-repeat}.sgpb-alert{padding:15px;border:1px
170
  solid transparent;border-radius:4px;text-align:center}.sgpb-alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.sgpb-alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.sgpb-alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.sgpb-alert
171
- p{margin-bottom:0px}[id*="__lpform_sgpb-"]{position:fixed !important}.sgpb-floating-button{display:inline-block;text-decoration:none;z-index:99999999;position:fixed;text-align:center;padding:10px;font-family:sans-serif;font-weight:600;box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none;cursor:pointer !important;letter-spacing:0.05em !important}#sgpb-floating-button{display:inline-block;text-decoration:none;font-family:sans-serif;font-weight:600;box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none;cursor:pointer !important;letter-spacing:0.05em !important}.sgpb-basic-left-center{transform:rotate(90deg) !important;transform-origin:left bottom 0px !important}.sgpb-basic-right-center{transform:rotate(-90deg);transform-origin:right bottom 0px}.sgpb-basic-bottom-right{right:0px;bottom:0px}.sgpb-basic-bottom-left{bottom:0px;left:0px}.sgpb-basic-top-right{right:0px;top:0px}.sgpb-basic-top-left{left:0px;top:0px}.sgpb-corner-bottom-right{right:-58px;bottom:-27px;transform:rotate(-45deg);transform-origin:right center 0px;width:160px;height:160px;display:inline-grid}.sgpb-corner-bottom-right:hover{right:-56px !important;bottom:-25px !important}.sgpb-corner-bottom-left{bottom:-139px;left:-106px;transform:rotate(45deg);transform-origin:right center 0px;width:160px;height:160px;display:inline-grid}.sgpb-corner-bottom-left:hover{bottom:-136px !important;left:-103px !important}.sgpb-corner-top-right{right:-58px;top:-27px;transform:rotate(45deg);transform-origin:right center 0px;line-height:260px;width:160px;height:160px;display:inline-grid}.sgpb-corner-top-right:hover{right:-56px !important;top:-25px !important}.sgpb-corner-top-left{left:-106px;top:-139px;transform:rotate(-45deg);transform-origin:right center 0px;line-height:260px;width:155px;height:155px;display:inline-grid}.sgpb-corner-top-left:hover{left:-103px !important;top:-136px !important}
 
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+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3Ln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m4DTpzUMWL3aNGrUGFjL1vYadegJImW3xlag9unbEgzo3o3Nt4DSCgz8bpBbN23fMGsDHe4aNgPjYJ13Q74AOzzv78CHly7vtefz6NOrX8++vfv38OPLn0+/vv37+PPr38+/v///ZAAGKOCABBZo4IEIJqjgggw26OCDEEYo4YQUVmjhhRhmqOGGHHbo4YcghijiiCSWaOKJKKao4oostujiizDGKOOMNNZo44045qjjjjz26OOPQAYp5JBEFmnkkUgmqeSSTDbJYwIAOw==') center center no-repeat}.sgpb-alert{padding:15px;border:1px
170
  solid transparent;border-radius:4px;text-align:center}.sgpb-alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.sgpb-alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.sgpb-alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.sgpb-alert
171
+ p{margin-bottom:0px}[id*="__lpform_sgpb-"]{position:fixed !important}.sgpb-floating-button{display:inline-block;text-decoration:none !important;z-index:99999999;position:fixed;text-align:center;padding:10px;font-family:sans-serif !important;font-weight:600 !important;box-shadow:none !important;-webkit-box-shadow:none !important;-moz-box-shadow:none !important;cursor:pointer !important;letter-spacing:0.05em !important}#sgpb-floating-button{display:inline-block;text-decoration:none;font-family:sans-serif;font-weight:600;box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none;cursor:pointer !important;letter-spacing:0.05em !important}#sgpb-floating-button:focus,.sgpb-floating-button:focus{outline:0
172
+ !important}.sgpb-basic-left-center{transform:rotate(90deg) !important;transform-origin:left bottom 0px !important}.sgpb-basic-right-center{transform:rotate(-90deg);transform-origin:right bottom 0px}.sgpb-basic-bottom-right{right:0px;bottom:0px}.sgpb-basic-bottom-left{bottom:0px;left:0px}.sgpb-basic-top-right{right:0px;top:0px}.sgpb-basic-top-left{left:0px;top:0px}.sgpb-corner-bottom-right{right:-58px;bottom:-27px;transform:rotate(-45deg);transform-origin:right center 0px;width:160px;height:160px;display:inline-grid;border:none !important}.sgpb-corner-bottom-right:hover{right:-56px !important;bottom:-25px !important}.sgpb-corner-bottom-left{bottom:-139px;left:-106px;transform:rotate(45deg);transform-origin:right center 0px;width:160px;height:160px;display:inline-grid;border:none !important}.sgpb-corner-bottom-left:hover{bottom:-136px !important;left:-103px !important}.sgpb-corner-top-right{right:-58px;top:-27px;transform:rotate(45deg);transform-origin:right center 0px;line-height:260px;width:160px;height:160px;display:inline-grid;border:none !important}.sgpb-corner-top-right:hover{right:-56px !important;top:-25px !important}.sgpb-corner-top-left{left:-106px;top:-139px;transform:rotate(-45deg);transform-origin:right center 0px;line-height:260px;width:155px;height:155px;display:inline-grid;border:none !important}.sgpb-corner-top-left:hover{left:-103px !important;top:-136px !important}.sgpb-corner-floating-button-text{margin-bottom:120px !important}
public/js/Backend.js CHANGED
File without changes
public/js/Banner.js CHANGED
File without changes
public/js/ExtensionsNotification.js CHANGED
File without changes
public/js/FloatingButton.js CHANGED
@@ -88,7 +88,7 @@ SGPBFloatingButton.prototype.createButton = function()
88
  var fontSize = document.getElementById('sgpb-floating-button-font-size').value;
89
  var text = document.getElementById('sgpb-floating-button-text').value;
90
  var button = document.createElement('button');
91
- button.innerHTML = text;
92
  button.id = 'sgpb-floating-button';
93
  button.style.fontSize = fontSize+'px';
94
  button.style.borderWidth = borderSize+'px';
88
  var fontSize = document.getElementById('sgpb-floating-button-font-size').value;
89
  var text = document.getElementById('sgpb-floating-button-text').value;
90
  var button = document.createElement('button');
91
+ button.innerHTML = '<span class="sgpb-'+buttonStyle+'-floating-button-text">'+text+'</span>';
92
  button.id = 'sgpb-floating-button';
93
  button.style.fontSize = fontSize+'px';
94
  button.style.borderWidth = borderSize+'px';
public/js/MediaButton.js CHANGED
@@ -1 +1,27 @@
1
- function SGPBMediaButton(){}SGPBMediaButton.prototype.init=function(){this.tinymceButton(),this.openMediaButtonPopup()},SGPBMediaButton.prototype.tinymceButton=function(){var n=this;jQuery(document).on("tinymce-editor-setup",function(e,t){-1===t.settings.toolbar1.indexOf("popupBuilderEditorButton")&&(t.settings.toolbar1+=", popupBuilderEditorButton",t.addButton("popupBuilderEditorButton",{icon:"wp-menu-image dashicons-before dashicons-menu-icon-sgpb sgpb-tinymce-button",onclick:function(){n.mediaButtonPopup()}}))})},SGPBMediaButton.prototype.openMediaButtonPopup=function(){var t=this;jQuery(".sgpb-tinymce-button, .sgpb-insert-media-button-js, .sgpb-insert-js-variable").unbind("click").bind("click",function(e){e.preventDefault(),t.mediaButtonPopup(jQuery(this))})},SGPBMediaButton.prototype.mediaButtonPopup=function(e){var t=1,n=this,o=jQuery(e).attr("data-id")||"sgpb-hidden-media-popup",i=new PopupConfig;i.magicCall("setContentPadding",14),i.magicCall("setContentBorderRadius",4),i.magicCall("setContentBorderRadiusType","px"),i.magicCall("setContentBorderWidth",5),i.magicCall("setContentBorderColor","#506274"),i.magicCall("setShadowSpread",1),i.magicCall("setContentShadowBlur",4),i.magicCall("setContentShadowColor","#cccccc"),i.magicCall("setMinWidth",400),i.magicCall("setSrcElement",o),i.magicCall("setOverlayColor","black"),i.magicCall("setOverlayOpacity",40);var a=i.combineConfigObj(),r=new SGPopup(a);r.open(),jQuery(window).bind("sgpbDidOpen",function(){jQuery(".sgpb-insert-popup").addClass("js-sg-select2"),mediaButtonParams.currentPostType!==mediaButtonParams.popupBuilderPostType?(jQuery(".sgpb-insert-popup-event").addClass("js-sg-select2"),1===t&&n.popupSelect2(),t++,jQuery(".select2-container--below").remove(),n.popupSelect2()):(n.popupSelect2(),jQuery(".select2-container--below").remove()),n.closeMediaButtonPopup(r)}),n.insertPopup(r)},SGPBMediaButton.prototype.closeMediaButtonPopup=function(e){jQuery(".sgpb-close-media-popup-js").on("click",function(){e.close()})},SGPBMediaButton.prototype.insertPopup=function(r){var s=!1;mediaButtonParams.currentPostType===mediaButtonParams.popupBuilderPostType&&(s=!0),jQuery(".sgpb-insert-popup-js").unbind("click").bind("click",function(){var e,t,n,o="",i=jQuery(".sgpb-insert-popup").val(),a=void 0!==(a=jQuery(".sgpb-insert-popup-event").val())?' event="'+a+'"':s?' insidePopup="on"':"";if(""!==i&&null!==i){if("onLoad"===a&&!s)return window.send_to_editor('[sg_popup id="'+i+'"'+a+"][/sg_popup]"),void r.close();void 0!==tinyMCE.editors.content&&null===document.getElementById("content").offsetParent?o=tinyMCE.activeEditor.selection.getContent()?tinyMCE.activeEditor.selection.getContent():"":(e=document.getElementById("content"),void 0!==document.selection?(e.focus(),o=document.selection.createRange().text):null!=e&&void 0!==e.selectionStart&&(t=e.selectionStart,n=e.selectionEnd,o=e.value.substring(t,n))),window.send_to_editor('[sg_popup id="'+i+'"'+a+"]"+o+"[/sg_popup]"),r.close()}else r.close()}),jQuery(".sgpb-insert-js-variable-to-editor").unbind("click").bind("click",function(){var e=jQuery(".sgpb-popup-dialog-main-div-wrapper .sgpb-js-variable-selector").val(),t=jQuery(".sgpb-popup-dialog-main-div-wrapper .sgpb-js-variable-attribute").val();jQuery(".sgpb-js-variable-errors").addClass("sg-hide-element");var n=!0;if(""===e&&(n=!1,jQuery(".sgpb-js-variable-selector-error").removeClass("sg-hide-element")),""===t&&(n=!1,jQuery(".sgpb-js-variable-attribute-error").removeClass("sg-hide-element")),!n)return!1;jQuery(".sgpb-js-variable-errors").addClass("sg-hide-element"),window.send_to_editor('[pbvariable selector="'+e+'" attribute="'+t+'"]'),r.close()})},SGPBMediaButton.prototype.popupSelect2=function(){jQuery(".js-sg-select2").length&&jQuery("select.js-sg-select2").each(function(){var e=jQuery(this).attr("data-select-type"),t=(jQuery(this).attr("data-select-class"),{width:"100%"});if("ajax"===e){if("undefined"==typeof SGPB_JS_PARAMS)return;t=jQuery.extend(t,{minimumInputLength:1,ajax:{url:SGPB_JS_PARAMS.url,dataType:"json",delay:250,type:"POST",data:function(e){var t=jQuery(this).attr("data-value-param");return{action:"select2_search_data",nonce_ajax:SGPB_JS_PARAMS.nonce,searchTerm:e.term,searchKey:t}},processResults:function(e){return{results:jQuery.map(e.items,function(e){return{text:e.text,id:e.id}})}}}})}jQuery(this).sgpbselect2(t)})},jQuery(document).ready(function(){var n=new SGPBMediaButton;jQuery(document).on("tinymce-editor-init",function(e,t){n.init()})});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function SGPBMediaButton(){}
2
+ SGPBMediaButton.prototype.init=function()
3
+ {this.tinymceButton();this.openMediaButtonPopup();};SGPBMediaButton.prototype.tinymceButton=function()
4
+ {var that=this;jQuery(document).on('tinymce-editor-setup',function(event,editor){if(editor.settings.toolbar1.indexOf('popupBuilderEditorButton')!==-1){return;}
5
+ 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()
6
+ {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)
7
+ {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();}
8
+ select2Init++;jQuery('.select2-container--below').remove();that.popupSelect2();}
9
+ else{that.popupSelect2();jQuery('.select2-container--below').remove();}
10
+ that.closeMediaButtonPopup(popup);});that.insertPopup(popup);};SGPBMediaButton.prototype.closeMediaButtonPopup=function(popup)
11
+ {jQuery('.sgpb-close-media-popup-js').on('click',function(){popup.close();});};SGPBMediaButton.prototype.insertPopup=function(popup)
12
+ {var insidePopup=false;if(mediaButtonParams.currentPostType===mediaButtonParams.popupBuilderPostType){insidePopup=true;}
13
+ 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+'"';}
14
+ else{selectedPopupEvent='';if(insidePopup){selectedPopupEvent=' insidePopup="on"';}}
15
+ if(selectedPopup===''||selectedPopup===null){popup.close();return;}
16
+ if(selectedPopupEvent==='onLoad'&&!insidePopup){window.send_to_editor('[sg_popup id="'+selectedPopup+'"'+selectedPopupEvent+'][/sg_popup]');popup.close();return;}
17
+ if(typeof tinyMCE.editors.content!=='undefined'&&(document.getElementById('content').offsetParent===null)){selectedContent=(tinyMCE.activeEditor.selection.getContent())?tinyMCE.activeEditor.selection.getContent():'';}
18
+ else{var content=document.getElementById('content');if(typeof document.selection!=='undefined'){content.focus();var sel=document.selection.createRange();selectedContent=sel.text;}
19
+ 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);}}}
20
+ 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');}
21
+ if(jsVariableAttribute===''){valid=false;jQuery('.sgpb-js-variable-attribute-error').removeClass('sg-hide-element');}
22
+ if(!valid){return false;}
23
+ jQuery('.sgpb-js-variable-errors').addClass('sg-hide-element');window.send_to_editor('[pbvariable selector="'+jsVariableSelector+'" attribute="'+jsVariableAttribute+'"]');popup.close();});};SGPBMediaButton.prototype.popupSelect2=function()
24
+ {if(!jQuery('.js-sg-select2').length){return;}
25
+ 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;}
26
+ 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}})};}}});}
27
+ 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/Newsletter.js CHANGED
File without changes
public/js/Popup.js CHANGED
File without changes
public/js/PopupBuilder.js CHANGED
@@ -2234,7 +2234,7 @@ SGPBPopup.setCookie = function(cName, cValue, exDays, cPageLevel)
2234
  }
2235
  }
2236
 
2237
- if (Boolean(cPageLevel)) {
2238
  cookiePageLevel = 'path=/;';
2239
  }
2240
 
@@ -2552,6 +2552,10 @@ SgpbEventListener.prototype.sgpbClick = function(listenerObj, eventData)
2552
  popupIds.push(popupId);
2553
  var mapId = listenerObj.filterPopupId(popupId);
2554
  popupIds.push(mapId);
 
 
 
 
2555
  for(var key in popupIds) {
2556
  var popupId = popupIds[key];
2557
  if (!popupIds.hasOwnProperty(key)) {
@@ -2624,7 +2628,9 @@ SgpbEventListener.prototype.sgpbHover = function(listenerObj, eventData)
2624
  var popupId = parseInt(popupObj.id);
2625
  popupIds.push(popupId);
2626
  var mapId = listenerObj.filterPopupId(popupId);
2627
- popupIds.push(mapId);
 
 
2628
 
2629
  for(var key in popupIds) {
2630
  var popupId = popupIds[key];
@@ -2648,7 +2654,7 @@ SgpbEventListener.prototype.sgpbHover = function(listenerObj, eventData)
2648
  if (!jQuery(this).attr('data-popup-id')) {
2649
  jQuery(this).attr('data-popup-id', popupId);
2650
  }
2651
- jQuery(this).bind('hover', function() {
2652
  if (hoverCount > 1) {
2653
  return false;
2654
  }
2234
  }
2235
  }
2236
 
2237
+ if (!Boolean(cPageLevel)) {
2238
  cookiePageLevel = 'path=/;';
2239
  }
2240
 
2552
  popupIds.push(popupId);
2553
  var mapId = listenerObj.filterPopupId(popupId);
2554
  popupIds.push(mapId);
2555
+ if (jQuery.inArray(mapId, popupIds) === -1) {
2556
+ popupIds.push(mapId);
2557
+ }
2558
+
2559
  for(var key in popupIds) {
2560
  var popupId = popupIds[key];
2561
  if (!popupIds.hasOwnProperty(key)) {
2628
  var popupId = parseInt(popupObj.id);
2629
  popupIds.push(popupId);
2630
  var mapId = listenerObj.filterPopupId(popupId);
2631
+ if (jQuery.inArray(mapId, popupIds) === -1) {
2632
+ popupIds.push(mapId);
2633
+ }
2634
 
2635
  for(var key in popupIds) {
2636
  var popupId = popupIds[key];
2654
  if (!jQuery(this).attr('data-popup-id')) {
2655
  jQuery(this).attr('data-popup-id', popupId);
2656
  }
2657
+ jQuery(this).bind('mouseenter', function() {
2658
  if (hoverCount > 1) {
2659
  return false;
2660
  }
public/js/PopupConfig.js CHANGED
@@ -1,5 +1,5 @@
1
  function PopupConfig()
2
- {this.prefix='sgpb';this.popupId;this.popupData;this.openDelay=0;this.currentObj={};this.allowed=true;this.showButton=true;this.buttonPosition='topRight';this.buttonInside=true;this.autoclose=false;this.overlayShouldClose=true;this.contentShouldClose=false;this.escShouldClose=true;this.closeButtonImage=sgpbPublicUrl+'img/close.png';this.popupTheme=1;this.popupType='html';this.closeButtonWidth=21;this.closeButtonHeight=21;this.closeButtonWidthType='px';this.closeButtonHeightType='px';this.closeButtonType='IMG';this.closeButtonText='Close';this.closeButtonDelay=0;this.overlayVisible=true;this.overlayColor='black';this.overlayOpacity=80;this.overlayAddClass='sgpb-popup-overlay sg-popup-overlay';this.contentPadding=8;this.zIndex=9999;this.contentShowBackground=true;this.contentBackgroundColor='#ffffff';this.contentBackgroundImage='';this.contentBackgroundMode='none';this.contentBackgroundPosition='';this.contentBorderStyle='solid';this.contentBorderRadius=0;this.contentBorderRadiusType='%';this.contentBorderColor='#f00';this.contentBorderWidth=0;this.boxBorderWidth=0;this.contentShadowColor='#ccc';this.contentShadowBlur=0;this.scrollingEnabled=false;this.shadowSpread=0;this.contentAddClass='class2';this.contents=false;this.positionRight=false;this.positionTop=false;this.positionBottom=false;this.positionLeft=false;this.width='-1';this.height='-1';this.maxWidth='-1';this.maxHeight='-1';this.minWidth='-1';this.minHeight='-1';this.srcElement='';this.openAnimationEffect='';this.openAnimationSpeed=0;this.openAnimationStatus=false;this.closeAnimationEffect='';this.closeAnimationSpeed=0;this.closeAnimationStatus=false;this.customShouldOpen=false;this.customShouldClose=false;}
3
  String.prototype.firstToLowerCase=function()
4
  {return this.charAt(0).toLowerCase()+this.slice(1);};String.prototype.firstToUpperCase=function()
5
  {return this.charAt(0).toUpperCase()+this.slice(1);};PopupConfig.prototype.magicCall=function(functionName,arrgname)
1
  function PopupConfig()
2
+ {this.prefix='sgpb';this.popupId;this.popupData;this.openDelay=0;this.currentObj={};this.allowed=true;this.showButton=true;this.buttonPosition='topRight';this.buttonInside=true;this.autoclose=false;this.overlayShouldClose=true;this.contentShouldClose=false;this.escShouldClose=true;this.closeButtonImage='img/close.png';this.popupTheme=1;this.popupType='html';this.closeButtonWidth=21;this.closeButtonHeight=21;this.closeButtonWidthType='px';this.closeButtonHeightType='px';this.closeButtonType='IMG';this.closeButtonText='Close';this.closeButtonDelay=0;this.overlayVisible=true;this.overlayColor='black';this.overlayOpacity=80;this.overlayAddClass='sgpb-popup-overlay sg-popup-overlay';this.contentPadding=8;this.zIndex=9999;this.contentShowBackground=true;this.contentBackgroundColor='#ffffff';this.contentBackgroundImage='';this.contentBackgroundMode='none';this.contentBackgroundPosition='';this.contentBorderStyle='solid';this.contentBorderRadius=0;this.contentBorderRadiusType='%';this.contentBorderColor='#f00';this.contentBorderWidth=0;this.boxBorderWidth=0;this.contentShadowColor='#ccc';this.contentShadowBlur=0;this.scrollingEnabled=false;this.shadowSpread=0;this.contentAddClass='class2';this.contents=false;this.positionRight=false;this.positionTop=false;this.positionBottom=false;this.positionLeft=false;this.width='-1';this.height='-1';this.maxWidth='-1';this.maxHeight='-1';this.minWidth='-1';this.minHeight='-1';this.srcElement='';this.openAnimationEffect='';this.openAnimationSpeed=0;this.openAnimationStatus=false;this.closeAnimationEffect='';this.closeAnimationSpeed=0;this.closeAnimationStatus=false;this.customShouldOpen=false;this.customShouldClose=false;}
3
  String.prototype.firstToLowerCase=function()
4
  {return this.charAt(0).toLowerCase()+this.slice(1);};String.prototype.firstToUpperCase=function()
5
  {return this.charAt(0).toUpperCase()+this.slice(1);};PopupConfig.prototype.magicCall=function(functionName,arrgname)
public/js/Subscribers.js CHANGED
@@ -1 +1,36 @@
1
- function SGPBSubscribers(){}SGPBSubscribers.prototype.init=function(){this.openAddSubscriberPopup(),this.openImportSubscriberPopup(),this.subscriberFileUploader(),this.closeAddSubscriberPopup(),this.importSubscriber(),this.dataImport(),this.deleteSubscribers(),this.addSubscribers(),this.toggleCheckedSubscribers(),this.fixSubscriptionBulkCheckbox(),this.exportSubscribers()},SGPBSubscribers.prototype.deleteSubscribers=function(){var e=[],r=this;jQuery(".sg-subs-delete-button").bind("click",function(){var s={};(s.ajaxNonce=jQuery(this).attr("data-ajaxNonce"),jQuery(".subs-delete-checkbox").each(function(){if(jQuery(this).prop("checked")){var r=jQuery(this).attr("data-delete-id");e.push(r)}}),0===e.length)?alert("Please select at least one subscriber."):confirm(SGPB_JS_LOCALIZATION.areYouSure)&&r.deleteSubscribersAjax(e,s)})},SGPBSubscribers.prototype.openImportSubscriberPopup=function(){jQuery(".bulkactions").empty()&&jQuery(".bulkactions").remove();var e=this;jQuery(".sgpb-import-subscriber").bind("click",function(){jQuery("#sgpb-import-subscribers").addClass("sgpb-show-add-subscriber-popup"),SGPBSubscribers.prototype.escKeyClosePopup(),e.closePopup()})},SGPBSubscribers.prototype.subscriberFileUploader=function(){var e,r=jQuery("#js-import-subscriber-button"),s=["text/plain","text/x-csv","text/csv"];if(!r.length)return!1;r.bind("click",function(r){if(r.preventDefault(),e)return e.open(),!1;(e=wp.media.frames.file_frame=wp.media({titleFF:SGPB_JS_LOCALIZATION.changeSound,button:{text:SGPB_JS_LOCALIZATION.changeSound},library:{type:s},multiple:!1})).on("select",function(){var r=e.state().get("selection").first().toJSON();-1!==s.indexOf(r.mime)?jQuery("#js-import-subscriber-file-url").val(r.url):alert(SGPB_JS_LOCALIZATION.audioSupportAlertMessage)}),e.open()})},SGPBSubscribers.prototype.importSubscriber=function(){var e=jQuery(".sgpb-import-subscriber-to-list"),r=this;if(!e.length)return!1;e.bind("click",function(){var s=jQuery(".js-sg-import-list").val(),t=jQuery("#js-import-subscriber-file-url").val(),i={action:"sgpb_import_subscribers",nonce:SGPB_JS_PARAMS.nonce,popupSubscriptionList:s,importListURL:t,beforeSend:function(){e.prop("disabled",!0)}};jQuery.post(ajaxurl,i,function(s){e.prop("disabled",!1),jQuery(".sgpb-add-subscriber-content-wrapper").html(""),jQuery(".sgpb-add-subscriber-content-wrapper").append(s),r.closePopup(),r.disableSelectedValue(),jQuery(".sgpb-add-new-subscribers-wrapper").addClass("sgpb-to-center-window"),jQuery(".sgpb-add-new-subscribers-wrapper").css({"margin-top":0}),r.saveImportValue()})})},SGPBSubscribers.prototype.disableSelectedValue=function(){var e=jQuery(".sgpb-our-fields-keys");if(!e.length)return!1;e.bind("change",function(){var e=jQuery(this).val();jQuery('.sgpb-our-fields-keys option[value="'+jQuery(this).attr("data-saved-value")+'"]').removeAttr("disabled"),jQuery(this).attr("data-saved-value",e),jQuery('.sgpb-our-fields-keys option[value="'+e+'"]').not(jQuery(this)).attr("disabled","disabled")})},SGPBSubscribers.prototype.saveImportValue=function(){jQuery(".sgpb-import-subscriber-to-list");var e={},r={action:"sgpb_save_imported_subscribers",nonce:SGPB_JS_PARAMS.nonce,popupSubscriptionList:jQuery(".sgpb-to-import-popup-id").val(),importListURL:jQuery(".sgpb-imported-file-url").val()};jQuery(".sgpb-save-subscriber").bind("click",function(){e={},jQuery(".sgpb-our-fields-keys").each(function(){var r=jQuery("option:selected",this).val();r&&(e[r]=jQuery(this).attr("data-index"))}),r.namesMapping=e,r.popupId=jQuery(".sgpb-to-import-popup-id").val(),r.beforeSend=function(){jQuery(".sgpb-save-subscriber").prop("disabled",!0)},jQuery.post(ajaxurl,r,function(e){window.location.reload(),jQuery(".sgpb-save-subscriber").prop("disabled",!1)})})},SGPBSubscribers.prototype.closePopup=function(){jQuery(".sgpb-subscriber-popup-close-btn-js").bind("click",function(){jQuery(this).parents(".sgpb-subscribers-popup").first().removeClass("sgpb-show-add-subscriber-popup"),jQuery(".sgpb-add-subscriber-input:selected").prop("selected",!1),jQuery(".sgpb-add-subscriber-input").val("")})},SGPBSubscribers.prototype.openAddSubscriberPopup=function(){jQuery(".bulkactions").empty()&&jQuery(".bulkactions").remove(),jQuery(".sgpb-add-subscriber").bind("click",function(){jQuery("#sgpb-add-new-subscriber").addClass("sgpb-show-add-subscriber-popup"),SGPBSubscribers.prototype.escKeyClosePopup()})},SGPBSubscribers.prototype.escKeyClosePopup=function(){jQuery(document).keyup(function(e){27===e.keyCode&&jQuery("#sgpb-add-new-subscriber").hasClass("sgpb-show-add-subscriber-popup")&&jQuery("#sgpb-add-new-subscriber").removeClass("sgpb-show-add-subscriber-popup")})},SGPBSubscribers.prototype.closeAddSubscriberPopup=function(){jQuery(".sgpb-add-subscriber-popup-close-btn-js").bind("click",function(){jQuery("#sgpb-add-new-subscriber").removeClass("sgpb-show-add-subscriber-popup"),jQuery(".sgpb-add-subscriber-input:selected").prop("selected",!1),jQuery(".sgpb-add-subscriber-input").val("")})},SGPBSubscribers.prototype.addSubscribers=function(){var e=this;jQuery(".sgpb-add-to-list-js").bind("click",function(){jQuery(".sgpb-subscription-error").addClass("sg-hide-element"),jQuery(".sgpb-email-error").addClass("sg-hide-element");var r=jQuery(".sgpb-add-subscribers-email").val(),s=jQuery(".sgpb-add-subscribers-first-name").val(),t=jQuery(".sgpb-add-subscribers-last-name").val(),i=[];jQuery(".js-sg-newsletter-forms > option").each(function(){jQuery(this).prop("selected")&&i.push(jQuery(this).val())});var u=r.search(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);if(!1===jQuery(".js-sg-newsletter-forms > option").is(":checked")&&-1===u)return jQuery(".sgpb-subscription-error").removeClass("sg-hide-element"),void jQuery(".sgpb-email-error").removeClass("sg-hide-element");if(!1!==jQuery(".js-sg-newsletter-forms > option").is(":checked"))if(-1!==u){jQuery(".sgpb-email-error").addClass("sg-hide-element");var o={action:"sgpb_add_subscribers",nonce:SGPB_JS_PARAMS.nonce,firstName:s,lastName:t,email:r,popups:i,beforeSend:function(){jQuery(".js-sgpb-add-spinner").removeClass("sg-hide-element")}};e.addToSubscribersAjax(o)}else jQuery(".sgpb-email-error").removeClass("sg-hide-element");else jQuery(".sgpb-subscription-error").removeClass("sg-hide-element")})},SGPBSubscribers.prototype.exportSubscribers=function(){var e=this;jQuery("#sgpb-subscription-popup").on("change",function(){jQuery(".sgpb-subscription-popup-id").val(jQuery(this).val())}),jQuery("#sgpb-subscribers-dates").on("change",function(){jQuery(".sgpb-subscribers-date").val(jQuery(this).val())}),jQuery(".sgpb-export-subscriber").bind("click",function(){var r="",s={};for(var t in s["sgpb-subscription-popup-id"]=e.getUrlParameter("sgpb-subscription-popup-id"),s.s=e.getUrlParameter("s"),s["sgpb-subscribers-date"]=e.getUrlParameter("sgpb-subscribers-date"),s.orderby=e.getUrlParameter("orderby"),s.order=e.getUrlParameter("order"),s)void 0!==s[t]&&""!==s[t]&&(r+="&"+t+"="+s[t]);window.location.href=SGPB_JS_ADMIN_URL.url+"?action=csv_file"+r})},SGPBSubscribers.prototype.getUrlParameter=function(e){for(var r=window.location.search.substring(1).split("&"),s=0;s<r.length;s++){var t=r[s].split("=");if(t[0]==e)return void 0!==t[1]?t[1]:""}},SGPBSubscribers.prototype.addToSubscribersAjax=function(e){jQuery.post(ajaxurl,e,function(e){1!==e?(jQuery(".sgpb-subscriber-adding-error").removeClass("sg-hide-element"),jQuery(".sgpb-subscribers-add-spinner").addClass("sg-hide-element")):location.reload()})},SGPBSubscribers.prototype.toggleCheckedSubscribers=function(){var e=this;jQuery(".subs-bulk").each(function(){jQuery(this).bind("click",function(){var r=jQuery(this).prop("checked");e.changeCheckedSubscribers(r)})})},SGPBSubscribers.prototype.changeCheckedSubscribers=function(e){jQuery(".subs-delete-checkbox").each(function(){jQuery(this).prop("checked",e)})},SGPBSubscribers.prototype.fixSubscriptionBulkCheckbox=function(){jQuery("#bulk,.column-bulk").removeClass().addClass("manage-column column-cb check-column")},SGPBSubscribers.prototype.dataImport=function(){var e;jQuery("#js-upload-export-file").click(function(r){r.preventDefault();var s=jQuery(this).attr("data-ajaxNonce");e?e.open():((e=wp.media.frames.file_frame=wp.media({titleFF:"Select Export File",button:{text:"Select Export File"},multiple:!1,library:{type:"text/plain"}})).on("select",function(){attachment=e.state().get("selection").first().toJSON();var r={action:"import_popups",ajaxNonce:s,attachmentUrl:attachment.url};jQuery(".js-sg-import-gif").removeClass("sg-hide-element"),jQuery.post(ajaxurl,r,function(e,r){location.reload(),jQuery(".js-sg-import-gif").addClass("sg-hide-element")})}),e.open())})},SGPBSubscribers.prototype.deleteSubscribersAjax=function(e){var r={action:"sgpb_subscribers_delete",nonce:SGPB_JS_PARAMS.nonce,subscribersId:e,beforeSend:function(){jQuery(".sgpb-subscribers-remove-spinner").removeClass("sg-hide-element")}};jQuery.post(ajaxurl,r,function(e){jQuery(".sgpb-subscribers-remove-spinner").addClass("sg-hide-element"),jQuery(".subs-delete-checkbox").prop("checked",""),window.location.reload()})},jQuery(document).ready(function(){(new SGPBSubscribers).init()});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function SGPBSubscribers(){}
2
+ SGPBSubscribers.prototype.init=function()
3
+ {this.openAddSubscriberPopup();this.openImportSubscriberPopup();this.subscriberFileUploader();this.closeAddSubscriberPopup();this.importSubscriber();this.dataImport();this.deleteSubscribers();this.addSubscribers();this.toggleCheckedSubscribers();this.fixSubscriptionBulkCheckbox();this.exportSubscribers();};SGPBSubscribers.prototype.deleteSubscribers=function()
4
+ {var checkedSubscribersList=[];var that=this;jQuery('.sg-subs-delete-button').bind('click',function(){var data={};data.ajaxNonce=jQuery(this).attr('data-ajaxNonce');jQuery('.subs-delete-checkbox').each(function(){var isChecked=jQuery(this).prop('checked');if(isChecked){var subscriberId=jQuery(this).attr('data-delete-id');checkedSubscribersList.push(subscriberId);}});if(checkedSubscribersList.length===0){alert('Please select at least one subscriber.');}
5
+ else{var isSure=confirm(SGPB_JS_LOCALIZATION.areYouSure);if(isSure){that.deleteSubscribersAjax(checkedSubscribersList,data);}}});};SGPBSubscribers.prototype.openImportSubscriberPopup=function()
6
+ {if(jQuery('.bulkactions').empty()){jQuery('.bulkactions').remove();}
7
+ var that=this;jQuery('.sgpb-import-subscriber').bind('click',function(){jQuery('#sgpb-import-subscribers').addClass('sgpb-show-add-subscriber-popup');SGPBSubscribers.prototype.escKeyClosePopup();that.closePopup();});};SGPBSubscribers.prototype.subscriberFileUploader=function()
8
+ {var uploadButton=jQuery('#js-import-subscriber-button');var supportedAudioTypes=['text/plain','text/x-csv','text/csv'];if(!uploadButton.length){return false;}
9
+ var uploader;uploadButton.bind('click',function(e){e.preventDefault();if(uploader){uploader.open();return false;}
10
+ uploader=wp.media.frames.file_frame=wp.media({titleFF:SGPB_JS_LOCALIZATION.changeSound,button:{text:SGPB_JS_LOCALIZATION.changeSound},library:{type:supportedAudioTypes},multiple:false});uploader.on('select',function(){var attachment=uploader.state().get('selection').first().toJSON();if(supportedAudioTypes.indexOf(attachment.mime)===-1){alert(SGPB_JS_LOCALIZATION.audioSupportAlertMessage);return;}
11
+ jQuery('#js-import-subscriber-file-url').val(attachment.url);});uploader.open();});};SGPBSubscribers.prototype.importSubscriber=function()
12
+ {var importSubscriber=jQuery('.sgpb-import-subscriber-to-list');var that=this;if(!importSubscriber.length){return false;}
13
+ importSubscriber.bind('click',function(){var popupSubscriptionList=jQuery('.js-sg-import-list').val();var importListURL=jQuery('#js-import-subscriber-file-url').val();var data={action:'sgpb_import_subscribers',nonce:SGPB_JS_PARAMS.nonce,popupSubscriptionList:popupSubscriptionList,importListURL:importListURL,beforeSend:function(){importSubscriber.prop('disabled',true);}};jQuery.post(ajaxurl,data,function(response){importSubscriber.prop('disabled',false);jQuery('.sgpb-add-subscriber-content-wrapper').html('');jQuery('.sgpb-add-subscriber-content-wrapper').append(response);that.closePopup();that.disableSelectedValue();jQuery('.sgpb-add-new-subscribers-wrapper').addClass('sgpb-to-center-window');jQuery('.sgpb-add-new-subscribers-wrapper').css({'margin-top':0});that.saveImportValue();});});};SGPBSubscribers.prototype.disableSelectedValue=function(){var selectOptioon=jQuery('.sgpb-our-fields-keys');if(!selectOptioon.length){return false;}
14
+ selectOptioon.bind('change',function(){var currentVal=jQuery(this).val();jQuery('.sgpb-our-fields-keys option[value="'+jQuery(this).attr('data-saved-value')+'"]').removeAttr('disabled');jQuery(this).attr('data-saved-value',currentVal);jQuery('.sgpb-our-fields-keys option[value="'+currentVal+'"]').not(jQuery(this)).attr('disabled','disabled');});};SGPBSubscribers.prototype.saveImportValue=function()
15
+ {var importSubscriber=jQuery('.sgpb-import-subscriber-to-list');var mapping={};var data={action:'sgpb_save_imported_subscribers',nonce:SGPB_JS_PARAMS.nonce,popupSubscriptionList:jQuery('.sgpb-to-import-popup-id').val(),importListURL:jQuery('.sgpb-imported-file-url').val(),};jQuery('.sgpb-save-subscriber').bind('click',function(){mapping={};var ourFields=jQuery('.sgpb-our-fields-keys');ourFields.each(function(){var currentValue=jQuery('option:selected',this).val();if(currentValue){mapping[currentValue]=jQuery(this).attr('data-index');}});data.namesMapping=mapping;data.popupId=jQuery('.sgpb-to-import-popup-id').val();data.beforeSend=function(){jQuery('.sgpb-save-subscriber').prop('disabled',true);};jQuery.post(ajaxurl,data,function(response){window.location.reload();jQuery('.sgpb-save-subscriber').prop('disabled',false);});});};SGPBSubscribers.prototype.closePopup=function()
16
+ {jQuery('.sgpb-subscriber-popup-close-btn-js').bind('click',function(){jQuery(this).parents('.sgpb-subscribers-popup').first().removeClass('sgpb-show-add-subscriber-popup');jQuery('.sgpb-add-subscriber-input:selected').prop('selected',false);jQuery('.sgpb-add-subscriber-input').val('');});};SGPBSubscribers.prototype.openAddSubscriberPopup=function()
17
+ {if(jQuery('.bulkactions').empty()){jQuery('.bulkactions').remove();}
18
+ jQuery('.sgpb-add-subscriber').bind('click',function(){jQuery('#sgpb-add-new-subscriber').addClass('sgpb-show-add-subscriber-popup');SGPBSubscribers.prototype.escKeyClosePopup();});};SGPBSubscribers.prototype.escKeyClosePopup=function()
19
+ {jQuery(document).keyup(function(e){if(e.keyCode===27){if(jQuery('#sgpb-add-new-subscriber').hasClass('sgpb-show-add-subscriber-popup')){jQuery('#sgpb-add-new-subscriber').removeClass('sgpb-show-add-subscriber-popup');}}});};SGPBSubscribers.prototype.closeAddSubscriberPopup=function()
20
+ {jQuery('.sgpb-add-subscriber-popup-close-btn-js').bind('click',function(){jQuery('#sgpb-add-new-subscriber').removeClass('sgpb-show-add-subscriber-popup');jQuery('.sgpb-add-subscriber-input:selected').prop('selected',false);jQuery('.sgpb-add-subscriber-input').val('');});};SGPBSubscribers.prototype.addSubscribers=function()
21
+ {var that=this;jQuery('.sgpb-add-to-list-js').bind('click',function(){jQuery('.sgpb-subscription-error').addClass('sg-hide-element');jQuery('.sgpb-email-error').addClass('sg-hide-element');var email=jQuery('.sgpb-add-subscribers-email').val();var firstName=jQuery('.sgpb-add-subscribers-first-name').val();var lastName=jQuery('.sgpb-add-subscribers-last-name').val();var subscriptionPopups=[];jQuery('.js-sg-newsletter-forms > option').each(function(){if(jQuery(this).prop('selected')){subscriptionPopups.push(jQuery(this).val());}});var validationString=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;var validEmail=email.search(validationString);if(jQuery('.js-sg-newsletter-forms > option').is(':checked')===false&&validEmail===-1){jQuery('.sgpb-subscription-error').removeClass('sg-hide-element');jQuery('.sgpb-email-error').removeClass('sg-hide-element');return;}
22
+ if(jQuery('.js-sg-newsletter-forms > option').is(':checked')===false){jQuery('.sgpb-subscription-error').removeClass('sg-hide-element');return;}
23
+ if(validEmail===-1){jQuery('.sgpb-email-error').removeClass('sg-hide-element');return;}
24
+ jQuery('.sgpb-email-error').addClass('sg-hide-element');var data={action:'sgpb_add_subscribers',nonce:SGPB_JS_PARAMS.nonce,firstName:firstName,lastName:lastName,email:email,popups:subscriptionPopups,beforeSend:function(){jQuery('.js-sgpb-add-spinner').removeClass('sg-hide-element');}};that.addToSubscribersAjax(data);});};SGPBSubscribers.prototype.exportSubscribers=function()
25
+ {var that=this;jQuery('#sgpb-subscription-popup').on('change',function(){jQuery('.sgpb-subscription-popup-id').val(jQuery(this).val());});jQuery('#sgpb-subscribers-dates').on('change',function(){jQuery('.sgpb-subscribers-date').val(jQuery(this).val());});jQuery('.sgpb-export-subscriber').bind('click',function(){var parameters='';var params={};params['sgpb-subscription-popup-id']=that.getUrlParameter('sgpb-subscription-popup-id');params['s']=that.getUrlParameter('s');params['sgpb-subscribers-date']=that.getUrlParameter('sgpb-subscribers-date');params['orderby']=that.getUrlParameter('orderby');params['order']=that.getUrlParameter('order');for(var i in params){if(typeof params[i]!=='undefined'&&params[i]!==''){parameters+='&'+i+'='+params[i];}}
26
+ window.location.href=SGPB_JS_ADMIN_URL.url+'?action=csv_file'+parameters;});};SGPBSubscribers.prototype.getUrlParameter=function(key)
27
+ {var pageUrl=window.location.search.substring(1);var urlVariables=pageUrl.split('&');for(var i=0;i<urlVariables.length;i++){var param=urlVariables[i].split('=');if(param[0]==key){if(typeof param[1]!=='undefined'){return param[1];}
28
+ else{return'';}}}};SGPBSubscribers.prototype.addToSubscribersAjax=function(data)
29
+ {jQuery.post(ajaxurl,data,function(response){if(response!==1){jQuery('.sgpb-subscriber-adding-error').removeClass('sg-hide-element');jQuery('.sgpb-subscribers-add-spinner').addClass('sg-hide-element');}
30
+ else{location.reload();}});};SGPBSubscribers.prototype.toggleCheckedSubscribers=function()
31
+ {var that=this;jQuery('.subs-bulk').each(function(){jQuery(this).bind('click',function(){var bulkStatus=jQuery(this).prop('checked');that.changeCheckedSubscribers(bulkStatus);});});};SGPBSubscribers.prototype.changeCheckedSubscribers=function(bulkStatus)
32
+ {jQuery('.subs-delete-checkbox').each(function(){jQuery(this).prop('checked',bulkStatus);});};SGPBSubscribers.prototype.fixSubscriptionBulkCheckbox=function()
33
+ {jQuery('#bulk,.column-bulk').removeClass().addClass('manage-column column-cb check-column');};SGPBSubscribers.prototype.dataImport=function()
34
+ {var custom_uploader;jQuery('#js-upload-export-file').click(function(e){e.preventDefault();var ajaxNonce=jQuery(this).attr('data-ajaxNonce');if(custom_uploader){custom_uploader.open();return;}
35
+ custom_uploader=wp.media.frames.file_frame=wp.media({titleFF:'Select Export File',button:{text:'Select Export File'},multiple:false,library:{type:'text/plain'}});custom_uploader.on('select',function(){attachment=custom_uploader.state().get('selection').first().toJSON();var data={action:'import_popups',ajaxNonce:ajaxNonce,attachmentUrl:attachment.url};jQuery('.js-sg-import-gif').removeClass('sg-hide-element');jQuery.post(ajaxurl,data,function(response,d){location.reload();jQuery('.js-sg-import-gif').addClass('sg-hide-element');});});custom_uploader.open();});};SGPBSubscribers.prototype.deleteSubscribersAjax=function(checkedSubscribersList)
36
+ {var data={action:'sgpb_subscribers_delete',nonce:SGPB_JS_PARAMS.nonce,subscribersId:checkedSubscribersList,beforeSend:function(){jQuery('.sgpb-subscribers-remove-spinner').removeClass('sg-hide-element');}};jQuery.post(ajaxurl,data,function(response){jQuery('.sgpb-subscribers-remove-spinner').addClass('sg-hide-element');jQuery('.subs-delete-checkbox').prop('checked','');window.location.reload();});};jQuery(document).ready(function(){var subscribers=new SGPBSubscribers();subscribers.init();});
public/js/Subscription.js CHANGED
@@ -1 +1,52 @@
1
- function SGPBSubscription(){this.expiryTime=365,this.submissionPopupId=0,this.newWindow=null,this.init()}SGPBSubscription.cookieName="SGPBSubscription",SGPBSubscription.prototype.init=function(){if("undefined"!=typeof SGPBFormBuilder)return!1;this.livePreview(),this.formSubmission()},SGPBSubscription.prototype.formSubmission=function(){var that=this;if("undefined"==typeof sgAddEvent)return!1;sgAddEvent(window,"sgpbDidOpen",function(e){var popupArgs=e.detail,popupId=popupArgs.popupId,popupOptions=SGPBPopup.getPopupOptionsById(popupId),additionalPopupParams={},subscriptionForm=jQuery("#sgpb-popup-dialog-main-div .sgpb-subs-form-"+popupId+" form"),submitButton=subscriptionForm.find(".js-subs-submit-btn"),sgpbSubsValidateObj={};try{sgpbSubsValidateObj=eval("sgpbSubsValidateObj"+popupId)}catch(e){}if("object"!=typeof sgpbSubsValidateObj)return!1;jQuery.validator.setDefaults({errorPlacement:function(e,s){var t=jQuery(s).attr("data-error-message-class");jQuery(".sgpb-subs-form-"+popupId+" ."+t).html(e)}}),sgpbSubsValidateObj.submitHandler=function(){var e=subscriptionForm.serialize(),s={action:"sgpb_subscription_submission",nonce:SGPB_JS_PARAMS.nonce,beforeSend:function(){submitButton.val(submitButton.attr("data-progress-title")),"redirectToURL"===popupOptions["sgpb-subs-success-behavior"]&&popupOptions["sgpb-subs-success-redirect-new-tab"]&&(that.newWindow=window.open(popupOptions["sgpb-subs-success-redirect-URL"]))},formData:e,popupPostId:popupId};jQuery.post(SGPB_JS_PARAMS.ajaxUrl,s,function(e){that.submissionPopupId=popupId,jQuery(".sgpb-subs-form-"+popupId+" .sgpb-alert").addClass("sg-hide-element"),submitButton.val(submitButton.attr("data-title")),additionalPopupParams.res=e,that.showMessages(additionalPopupParams),that.processAfterSuccessfulSubmission(s)})},subscriptionForm.validate(sgpbSubsValidateObj)}),jQuery(window).on("sgpbDidClose",function(e){var s=e.detail.popupId;jQuery(".sgpb-subs-form-"+s+" form label.error").hide()})},SGPBSubscription.prototype.processAfterSuccessfulSubmission=function(e){if(jQuery.isEmptyObject(e))return!1;e.action="sgpb_process_after_submission",jQuery.post(SGPB_JS_PARAMS.ajaxUrl,e,function(e){})},SGPBSubscription.prototype.showMessages=function(e){return 1==e.res?this.subscriptionSuccessBehavior():(null!==this.newWindow&&this.newWindow.close(),this.showErrorMessage()),window.dispatchEvent(new Event("resize")),!0},SGPBSubscription.prototype.showErrorMessage=function(){var e=parseInt(this.submissionPopupId);jQuery(".sgpb-subs-form-"+e+" .sgpb-alert-danger").removeClass("sg-hide-element")},SGPBSubscription.prototype.subscriptionSuccessBehavior=function(){var e={popupId:this.submissionPopupId,eventName:"sgpbSubscriptionSuccess"};jQuery(window).trigger("sgpbFormSuccess",e);var s=parseInt(this.submissionPopupId),t=SGPBPopup.getPopupOptionsById(s),i="showMessage";switch(jQuery(".sgpb-subs-form-"+s+" form").remove(),void 0!==t["sgpb-subs-hide-subs-users"]&&this.setSubscriptionCookie(s),void 0!==t["sgpb-subs-success-behavior"]&&(i=t["sgpb-subs-success-behavior"]),this.resetFieldsValues(),i){case"showMessage":jQuery(".sgpb-subs-form-"+s+" .sgpb-alert-success").removeClass("sg-hide-element");break;case"redirectToURL":this.redirectToURL(t);break;case"openPopup":this.openSuccessPopup(t);break;case"hidePopup":SGPBPopup.closePopupById(this.submissionPopupId)}},SGPBSubscription.prototype.openSuccessPopup=function(e){var s=this;setTimeout(function(){SGPBPopup.closePopupById(s.submissionPopupId)},0),void 0!==e["sgpb-subs-success-popup"]&&sgAddEvent(window,"sgpbDidClose",this.openPopup(e))},SGPBSubscription.prototype.openPopup=function(e){if(void 0===e["sgpb-subs-success-popup"])return!1;var s=parseInt(e["sgpb-subs-success-popup"]),t=SGPBPopup.getPopupOptionsById(s),i=new SGPBPopup;i.setPopupId(s),i.setPopupData(t),setTimeout(function(){i.prepareOpen()},500)},SGPBSubscription.prototype.setSubscriptionCookie=function(e){var s=window.location.href,t=SGPBSubscription.cookieName+e,i=this.expiryTime;if(""===SGPopup.getCookie(t)){var o=[s];SGPBPopup.setCookie(t,JSON.stringify(o),i)}},SGPBSubscription.prototype.redirectToURL=function(e){var s=e["sgpb-subs-success-redirect-URL"],t=e["sgpb-subs-success-redirect-new-tab"];if(SGPBPopup.closePopupById(this.submissionPopupId),t)return!0;window.location.href=s},SGPBSubscription.prototype.resetFieldsValues=function(){if(!jQuery(".js-subs-text-inputs").length)return!1;jQuery(".js-subs-text-inputs").each(function(){jQuery(this).val("")})},SGPBSubscription.prototype.livePreview=function(){this.binding(),this.changeLabels(),this.changeButtonTitle(),this.changeColor(),this.changeOpacity(),this.changePadding(),this.changeDimension(),this.preventDefaultSubmission(),"function"==typeof SGPBBackend&&SGPBBackend.makeContactAndSubscriptionFieldsRequired()},SGPBSubscription.prototype.preventDefaultSubmission=function(){var e=jQuery('.sgpb-subscription-admin-wrapper input[type="submit"]');if(!e.length)return!1;e.bind("click",function(e){e.preventDefault()})},SGPBSubscription.prototype.changeDimension=function(){var e=this;jQuery(".js-subs-dimension").change(function(){var s=jQuery(this),t=e.changeDimensionMode(s.val()),i=s.attr("data-style-type"),o=s.attr("data-field-type"),r=s.attr("data-subs-rel");"input"===o&&(jQuery(".sgpb-gdpr-label-wrapper").css("width",t),jQuery(".sgpb-gdpr-info").css("width",t));var p={};p[i]=t,jQuery("."+r).css(p)})},SGPBSubscription.prototype.changePadding=function(){jQuery(".js-sgpb-form-padding").on("change keydown keyup",function(){var e=jQuery(this).val();jQuery(".sgpb-subscription-admin-wrapper").css("padding",e+"px")})},SGPBSubscription.prototype.changeColor=function(){var e=this;if(void 0===jQuery.wp||"function"!=typeof jQuery.wp.wpColorPicker)return!1;jQuery(".js-subs-color-picker").each(function(){jQuery(this).wpColorPicker({change:function(){e.colorPickerChange(jQuery(this))}})}),jQuery(".wp-picker-holder").mouseover(function(){var s=jQuery(this).prev().find(".js-subs-color-picker");e.colorPickerChange(s)}),jQuery(".wp-picker-holder").bind("click",function(){var s=jQuery(this).prev().find(".js-subs-color-picker");e.colorPickerChange(s)})},SGPBSubscription.prototype.changeOpacity=function(){var e=this;jQuery(".js-subs-bg-opacity").next().find(".range-handle").on("change mousemove",function(){e.colorPickerChange(jQuery("input[name=sgpb-subs-form-bg-color]"))})},SGPBSubscription.prototype.setupPlaceholderColor=function(e,s){jQuery("."+e).each(function(){jQuery("#sgpb-placeholder-style").remove();var t="."+e+"::-webkit-input-placeholder {color: "+s+" !important;}";t+="."+e+"::-moz-placeholder {color: "+s+" !important;}";var i='<style id="sgpb-placeholder-style">'+(t+="."+e+"::-ms-placeholder {color: "+s+" !important;}")+"</style>";jQuery("head").append(i)})},SGPBSubscription.prototype.colorPickerChange=function(e){var s=jQuery("input[name=sgpb-subs-form-bg-opacity]").val(),t=e.val();if(void 0===t)return!1;t=SGPBBackend.hexToRgba(t,s);var i=e.attr("data-style-type"),o=e.attr("data-subs-rel");if("placeholder"===i)return this.setupPlaceholderColor(o,t),!1;var r={};r[i]=t,jQuery("."+o).each(function(){jQuery(this).css(r)})},SGPBSubscription.prototype.changeButtonTitle=function(){jQuery(".js-subs-btn-title").bind("input",function(){var e=jQuery(this).attr("data-subs-rel"),s=jQuery(this).val();jQuery("."+e).val(s)})},SGPBSubscription.prototype.changeLabels=function(){jQuery("#sgpb-subs-gdpr-text").on("change",function(){var e=jQuery(this).val();jQuery(this).text(""),jQuery(this).text(e),jQuery(".sgpb-gdpr-text-js").html(e)}),jQuery(".js-subs-field-placeholder").each(function(){jQuery(this).bind("input",function(){var e=jQuery(this).attr("data-subs-rel"),s=jQuery(this).val();"js-subs-gdpr-label"===e?jQuery("."+e).next().text(s):jQuery("."+e).attr("placeholder",s)})})},SGPBSubscription.prototype.binding=function(){var e=this;jQuery(".js-checkbox-field-status").bind("click",function(){var s=jQuery(this).is(":checked"),t=jQuery(this).attr("data-subs-field-wrapper"),i=jQuery("."+t);e.toggleVisible(i,s)}),jQuery(".js-checkbox-acordion").each(function(){var s=jQuery(this).is(":checked"),t=jQuery(this).attr("data-subs-rel"),i=jQuery("."+t);e.toggleVisible(i,s)})},SGPBSubscription.prototype.toggleVisible=function(e,s){s?e.css({display:"block"}):e.css({display:"none"})},SGPBSubscription.prototype.changeDimensionMode=function(e){var s;return s=parseInt(e)+"px",-1===e.indexOf("%")&&-1===e.indexOf("px")||(s=e),s},SGPBSubscription.prototype.allowToOpen=function(e){var s=!0,t=SGPBSubscription.cookieName+e;return""!=SGPopup.getCookie(t)&&(s=!1),s},jQuery(document).ready(function(){new SGPBSubscription});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function SGPBSubscription()
2
+ {this.expiryTime=365;this.submissionPopupId=0;this.newWindow=null;this.init();}
3
+ SGPBSubscription.cookieName='SGPBSubscription';SGPBSubscription.prototype.init=function()
4
+ {if(typeof SGPBFormBuilder!=='undefined'){return false;}
5
+ this.livePreview();this.formSubmission();};SGPBSubscription.prototype.formSubmission=function()
6
+ {var that=this;if(typeof sgAddEvent==='undefined'){return false;}
7
+ sgAddEvent(window,'sgpbDidOpen',function(e){var popupArgs=e.detail;var popupId=popupArgs.popupId;var popupOptions=SGPBPopup.getPopupOptionsById(popupId);var additionalPopupParams={};var subscriptionForm=jQuery('#sgpb-popup-dialog-main-div .sgpb-subs-form-'+popupId+' form');var submitButton=subscriptionForm.find('.js-subs-submit-btn');var sgpbSubsValidateObj={};try{sgpbSubsValidateObj=eval('sgpbSubsValidateObj'+popupId);}
8
+ catch(err){}
9
+ if(typeof sgpbSubsValidateObj!=='object'){return false;}
10
+ jQuery.validator.setDefaults({errorPlacement:function(error,element){var errorWrapperClassName=jQuery(element).attr('data-error-message-class');jQuery('.sgpb-subs-form-'+popupId+' .'+errorWrapperClassName).html(error);}});sgpbSubsValidateObj.submitHandler=function()
11
+ {var formData=subscriptionForm.serialize();var ajaxData={action:'sgpb_subscription_submission',nonce:SGPB_JS_PARAMS.nonce,beforeSend:function(){submitButton.val(submitButton.attr('data-progress-title'));if(popupOptions['sgpb-subs-success-behavior']==='redirectToURL'&&popupOptions['sgpb-subs-success-redirect-new-tab']){that.newWindow=window.open(popupOptions['sgpb-subs-success-redirect-URL']);}},formData:formData,popupPostId:popupId};jQuery.post(SGPB_JS_PARAMS.ajaxUrl,ajaxData,function(res){that.submissionPopupId=popupId;jQuery('.sgpb-subs-form-'+popupId+' .sgpb-alert').addClass('sg-hide-element');submitButton.val(submitButton.attr('data-title'));additionalPopupParams['res']=res;that.showMessages(additionalPopupParams);that.processAfterSuccessfulSubmission(ajaxData);});};subscriptionForm.validate(sgpbSubsValidateObj);});jQuery(window).on('sgpbDidClose',function(e){var popupArgs=e.detail;var popupId=popupArgs.popupId;jQuery('.sgpb-subs-form-'+popupId+' form label.error').hide();});};SGPBSubscription.prototype.processAfterSuccessfulSubmission=function(ajaxData)
12
+ {if(jQuery.isEmptyObject(ajaxData)){return false;}
13
+ ajaxData.action='sgpb_process_after_submission';jQuery.post(SGPB_JS_PARAMS.ajaxUrl,ajaxData,function(res){});};SGPBSubscription.prototype.showMessages=function(res)
14
+ {var that=this;if(res['res']==1){this.subscriptionSuccessBehavior();}
15
+ else{if(that.newWindow!==null){that.newWindow.close();}
16
+ this.showErrorMessage();}
17
+ window.dispatchEvent(new Event('resize'));return true;};SGPBSubscription.prototype.showErrorMessage=function()
18
+ {var popupId=parseInt(this.submissionPopupId);jQuery('.sgpb-subs-form-'+popupId+' .sgpb-alert-danger').removeClass('sg-hide-element');};SGPBSubscription.prototype.subscriptionSuccessBehavior=function()
19
+ {var settings={popupId:this.submissionPopupId,eventName:'sgpbSubscriptionSuccess'};jQuery(window).trigger('sgpbFormSuccess',settings);var popupId=parseInt(this.submissionPopupId);var popupOptions=SGPBPopup.getPopupOptionsById(popupId);var behavior='showMessage';jQuery('.sgpb-subs-form-'+popupId+' form').remove();if(typeof popupOptions['sgpb-subs-hide-subs-users']!=='undefined'){this.setSubscriptionCookie(popupId);}
20
+ if(typeof popupOptions['sgpb-subs-success-behavior']!=='undefined'){behavior=popupOptions['sgpb-subs-success-behavior'];}
21
+ this.resetFieldsValues();switch(behavior){case'showMessage':jQuery('.sgpb-subs-form-'+popupId+' .sgpb-alert-success').removeClass('sg-hide-element');break;case'redirectToURL':this.redirectToURL(popupOptions);break;case'openPopup':this.openSuccessPopup(popupOptions);break;case'hidePopup':SGPBPopup.closePopupById(this.submissionPopupId);break;}};SGPBSubscription.prototype.openSuccessPopup=function(popupOptions)
22
+ {var that=this;setTimeout(function(){SGPBPopup.closePopupById(that.submissionPopupId);},0);if(typeof popupOptions['sgpb-subs-success-popup']!=='undefined'){sgAddEvent(window,'sgpbDidClose',this.openPopup(popupOptions));}};SGPBSubscription.prototype.openPopup=function(popupOptions)
23
+ {if(typeof popupOptions['sgpb-subs-success-popup']==='undefined'){return false;}
24
+ var subPopupId=parseInt(popupOptions['sgpb-subs-success-popup']);var subPopupOptions=SGPBPopup.getPopupOptionsById(subPopupId);var popupObj=new SGPBPopup();popupObj.setPopupId(subPopupId);popupObj.setPopupData(subPopupOptions);setTimeout(function(){popupObj.prepareOpen();},500);};SGPBSubscription.prototype.setSubscriptionCookie=function(popupId)
25
+ {var currentUrl=window.location.href;var cookieName=SGPBSubscription.cookieName+popupId;var expiryTime=this.expiryTime;if(SGPopup.getCookie(cookieName)===''){var cookieObject=[currentUrl];SGPBPopup.setCookie(cookieName,JSON.stringify(cookieObject),expiryTime);}};SGPBSubscription.prototype.redirectToURL=function(popupOptions)
26
+ {var redirectURL=popupOptions['sgpb-subs-success-redirect-URL'];var redirectToNewTab=popupOptions['sgpb-subs-success-redirect-new-tab'];SGPBPopup.closePopupById(this.submissionPopupId);if(redirectToNewTab){return true;}
27
+ window.location.href=redirectURL;};SGPBSubscription.prototype.resetFieldsValues=function()
28
+ {if(!jQuery('.js-subs-text-inputs').length){return false;}
29
+ jQuery('.js-subs-text-inputs').each(function(){jQuery(this).val('');});};SGPBSubscription.prototype.livePreview=function()
30
+ {this.binding();this.changeLabels();this.changeButtonTitle();this.changeColor();this.changeOpacity();this.changePadding();this.changeDimension();this.preventDefaultSubmission();if(typeof SGPBBackend==='function'){SGPBBackend.makeContactAndSubscriptionFieldsRequired();}};SGPBSubscription.prototype.preventDefaultSubmission=function()
31
+ {var formSubmitButton=jQuery('.sgpb-subscription-admin-wrapper input[type="submit"]');if(!formSubmitButton.length){return false;}
32
+ formSubmitButton.bind('click',function(e){e.preventDefault();});};SGPBSubscription.prototype.changeDimension=function()
33
+ {var that=this;jQuery('.js-subs-dimension').change(function(){var element=jQuery(this);var dimension=that.changeDimensionMode(element.val());var styleType=element.attr('data-style-type');var fieldtype=element.attr('data-field-type');var selector=element.attr('data-subs-rel');if(fieldtype==='input'){jQuery('.sgpb-gdpr-label-wrapper').css('width',dimension);jQuery('.sgpb-gdpr-info').css('width',dimension);}
34
+ var styleObj={};styleObj[styleType]=dimension;jQuery('.'+selector).css(styleObj);});};SGPBSubscription.prototype.changePadding=function()
35
+ {jQuery('.js-sgpb-form-padding').on('change keydown keyup',function(){var padding=jQuery(this).val();jQuery('.sgpb-subscription-admin-wrapper').css('padding',padding+'px');});};SGPBSubscription.prototype.changeColor=function()
36
+ {var that=this;if(typeof jQuery.wp==='undefined'||typeof jQuery.wp.wpColorPicker!=='function'){return false;}
37
+ jQuery('.js-subs-color-picker').each(function(){var currentColorPicker=jQuery(this);currentColorPicker.wpColorPicker({change:function(){that.colorPickerChange(jQuery(this));}});});jQuery('.wp-picker-holder').mouseover(function(){var selectedInput=jQuery(this).prev().find('.js-subs-color-picker');that.colorPickerChange(selectedInput);});jQuery('.wp-picker-holder').bind('click',function(){var selectedInput=jQuery(this).prev().find('.js-subs-color-picker');that.colorPickerChange(selectedInput);});};SGPBSubscription.prototype.changeOpacity=function()
38
+ {var that=this;jQuery('.js-subs-bg-opacity').next().find('.range-handle').on('change mousemove',function(){that.colorPickerChange(jQuery('input[name=sgpb-subs-form-bg-color]'));});};SGPBSubscription.prototype.setupPlaceholderColor=function(element,color)
39
+ {jQuery('.'+element).each(function(){jQuery('#sgpb-placeholder-style').remove();var styleContent='.'+element+'::-webkit-input-placeholder {color: '+color+' !important;}';styleContent+='.'+element+'::-moz-placeholder {color: '+color+' !important;}';styleContent+='.'+element+'::-ms-placeholder {color: '+color+' !important;}';var styleBlock='<style id="sgpb-placeholder-style">'+styleContent+'</style>';jQuery('head').append(styleBlock);});};SGPBSubscription.prototype.colorPickerChange=function(colorPicker)
40
+ {var that=this;var opacity=jQuery('input[name=sgpb-subs-form-bg-opacity]').val();var colorValue=colorPicker.val();if(typeof colorValue==='undefined'){return false;}
41
+ colorValue=SGPBBackend.hexToRgba(colorValue,opacity);var styleType=colorPicker.attr('data-style-type');var selector=colorPicker.attr('data-subs-rel');if('placeholder'===styleType){that.setupPlaceholderColor(selector,colorValue);return false;}
42
+ var styleObj={};styleObj[styleType]=colorValue;jQuery('.'+selector).each(function(){jQuery(this).css(styleObj);});};SGPBSubscription.prototype.changeButtonTitle=function()
43
+ {jQuery('.js-subs-btn-title').bind('input',function(){var className=jQuery(this).attr('data-subs-rel');var val=jQuery(this).val();jQuery('.'+className).val(val);});};SGPBSubscription.prototype.changeLabels=function()
44
+ {jQuery('#sgpb-subs-gdpr-text').on('change',function(){var text=jQuery(this).val();jQuery(this).text('');jQuery(this).text(text);jQuery('.sgpb-gdpr-text-js').html(text);});jQuery('.js-subs-field-placeholder').each(function(){jQuery(this).bind('input',function(){var className=jQuery(this).attr('data-subs-rel');var placeholderText=jQuery(this).val();if(className==='js-subs-gdpr-label'){jQuery('.'+className).next().text(placeholderText);}
45
+ else{jQuery('.'+className).attr('placeholder',placeholderText);}});});};SGPBSubscription.prototype.binding=function()
46
+ {var that=this;jQuery('.js-checkbox-field-status').bind('click',function(){var isChecked=jQuery(this).is(':checked');var elementClassName=jQuery(this).attr('data-subs-field-wrapper');var element=jQuery('.'+elementClassName);that.toggleVisible(element,isChecked);});jQuery('.js-checkbox-acordion').each(function(){var isChecked=jQuery(this).is(':checked');var elementClassName=jQuery(this).attr('data-subs-rel');var element=jQuery('.'+elementClassName);that.toggleVisible(element,isChecked);});};SGPBSubscription.prototype.toggleVisible=function(toggleElement,elementStatus)
47
+ {if(elementStatus){toggleElement.css({'display':'block'});}
48
+ else{toggleElement.css({'display':'none'});}};SGPBSubscription.prototype.changeDimensionMode=function(dimension)
49
+ {var size;size=parseInt(dimension)+'px';if(dimension.indexOf('%')!==-1||dimension.indexOf('px')!==-1){size=dimension;}
50
+ return size;};SGPBSubscription.prototype.allowToOpen=function(popupId)
51
+ {var allowStatus=true;var cookieName=SGPBSubscription.cookieName+popupId;if(SGPopup.getCookie(cookieName)!=''){allowStatus=false;}
52
+ return allowStatus;};jQuery(document).ready(function(){new SGPBSubscription();});
public/views/importConfigView.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
  use sgpb\AdminHelper;
3
  use sgpb\SubscriptionPopup;
 
4
 
5
  $fileContent = AdminHelper::getFileFromURL($fileURL);
6
  $csvFileArray = array_map('str_getcsv', file($fileURL));
1
  <?php
2
  use sgpb\AdminHelper;
3
  use sgpb\SubscriptionPopup;
4
+ ini_set('auto_detect_line_endings', '1');
5
 
6
  $fileContent = AdminHelper::getFileFromURL($fileURL);
7
  $csvFileArray = array_map('str_getcsv', file($fileURL));
public/views/newsletter.php CHANGED
File without changes
readme.txt CHANGED
@@ -9,7 +9,7 @@ Tags: popup, pop up, wordpress popup, popup maker, exit popup, popup builder, wo
9
  Requires at least: 4.2
10
  Tested up to: 5.5
11
  Requires PHP: 5.3.3
12
- Stable tag: 3.68.5.2
13
  License: GPLv2 or later
14
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
15
 
@@ -186,6 +186,17 @@ Go to the Popup Builder settings and set your desired options.
186
 
187
  == Changelog ==
188
 
 
 
 
 
 
 
 
 
 
 
 
189
  = Version 3.68.5 =
190
  * Added new feature: Floating Button - Trigger popup by clicking on the button
191
  * Improvement of Newsletter: Added an option to send test emails before running the email campaign
@@ -1211,7 +1222,7 @@ Leave us a good review :)
1211
 
1212
  == Upgrade Notice ==
1213
 
1214
- Current Version of Popup Builder is 3.68.5
1215
 
1216
  == Other Notes ==
1217
 
9
  Requires at least: 4.2
10
  Tested up to: 5.5
11
  Requires PHP: 5.3.3
12
+ Stable tag: 3.69
13
  License: GPLv2 or later
14
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
15
 
186
 
187
  == Changelog ==
188
 
189
+ = Version 3.69 =
190
+ * Improvement of code in SGPopup.php/PopupLoader.php/PopupBuilder.js files
191
+ * Improvement of WPML compatibility
192
+ * Improvement of subscribers’ import functionality, all CSV file formats are supported (CSV UTF-8, Comma delimited, Macintosh, MS-DOS)
193
+ * Improvement of Image popup type, ALT attribute added for search engine optimization
194
+ * Improvement of Floating button styles
195
+ * Improvement of logic in opening conditions
196
+ * Conflict fixed related to Litespeed cache plugin
197
+ * Bug fixed related to "Hover" and "Click" opening events
198
+ * Bug fixed related to Multisite dynamic paths
199
+
200
  = Version 3.68.5 =
201
  * Added new feature: Floating Button - Trigger popup by clicking on the button
202
  * Improvement of Newsletter: Added an option to send test emails before running the email campaign
1222
 
1223
  == Upgrade Notice ==
1224
 
1225
+ Current Version of Popup Builder is 3.69
1226
 
1227
  == Other Notes ==
1228