Popup Builder – Responsive WordPress Pop up - Version 2.5.5

Version Description

Current Version of Popup Builder is 2.5.4

Download this release

Release Info

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

Code changes from version 2.5.3 to 2.5.5

classes/sgDataTable/ListTable.php CHANGED
@@ -995,7 +995,7 @@ class SGPB_ListTable {
995
  $current_url = remove_query_arg( 'paged', $current_url );
996
 
997
  if ( isset( $_GET['orderby'] ) )
998
- $current_orderby = $_GET['orderby'];
999
  else
1000
  $current_orderby = '';
1001
 
995
  $current_url = remove_query_arg( 'paged', $current_url );
996
 
997
  if ( isset( $_GET['orderby'] ) )
998
+ $current_orderby = sanitize_text_field($_GET['orderby']);
999
  else
1000
  $current_orderby = '';
1001
 
classes/sgDataTable/SGPopupTable.php CHANGED
@@ -35,15 +35,16 @@ class SGPB_PopupsView extends SGPB_Table
35
  public function customizeRow(&$row)
36
  {
37
  $id = $row[0];
 
38
  $isActivePopup = SgPopupGetData::isActivePopup($id);
39
  $switchButton = '<label class="sg-switch">
40
- <input class="sg-switch-checkbox" data-switch-id="'.$id.'" type="checkbox" '.$isActivePopup.'>
41
  <div class="sg-slider sg-round"></div>
42
  </label>';
43
  $type = $row[2];
44
  $editUrl = admin_url()."admin.php?page=edit-popup&id=".$id."&type=".$type."";
45
  $row[3] = "<input type='text' onfocus='this.select();' readonly value='[sg_popup id=".$id."]' class='large-text code'>";
46
- $row[4] = '<a href="'.@$editUrl.'">'.__('Edit', 'sgpt').'</a>&nbsp;&nbsp;<a href="#" data-sg-popup-id="'.$id.'" class="sg-js-delete-link">'.__('Delete', 'sgpt').'</a>
47
  <a href="'.admin_url().'admin-post.php?action=popup_clone&id='.$id.'" data-sg-popup-id="'.$id.'" class="sg-js-popup-clone">Clone</a>';
48
  array_splice( $row, 1, 0, $switchButton);
49
  }
@@ -54,7 +55,7 @@ class SGPB_PopupsView extends SGPB_Table
54
  global $wpdb;
55
  if(isset($_POST['s']) && !empty($_POST['s']))
56
  {
57
- $searchCriteria = $_POST['s'];
58
  $searchQuery = " WHERE title LIKE '%$searchCriteria%' ";
59
  }
60
  $query .= $searchQuery;
35
  public function customizeRow(&$row)
36
  {
37
  $id = $row[0];
38
+ $ajaxNonce = wp_create_nonce("sgPopupBuilderDeleteNonce");
39
  $isActivePopup = SgPopupGetData::isActivePopup($id);
40
  $switchButton = '<label class="sg-switch">
41
+ <input class="sg-switch-checkbox" data-switch-id="'.$id.'" type="checkbox" '.$isActivePopup.' data-ajaxNonce="'.$ajaxNonce.'">
42
  <div class="sg-slider sg-round"></div>
43
  </label>';
44
  $type = $row[2];
45
  $editUrl = admin_url()."admin.php?page=edit-popup&id=".$id."&type=".$type."";
46
  $row[3] = "<input type='text' onfocus='this.select();' readonly value='[sg_popup id=".$id."]' class='large-text code'>";
47
+ $row[4] = '<a href="'.@$editUrl.'">'.__('Edit', 'sgpt').'</a>&nbsp;&nbsp;<a href="#" data-sg-popup-id="'.$id.'" data-ajaxNonce="'.$ajaxNonce.'" class="sg-js-delete-link">'.__('Delete', 'sgpt').'</a>
48
  <a href="'.admin_url().'admin-post.php?action=popup_clone&id='.$id.'" data-sg-popup-id="'.$id.'" class="sg-js-popup-clone">Clone</a>';
49
  array_splice( $row, 1, 0, $switchButton);
50
  }
55
  global $wpdb;
56
  if(isset($_POST['s']) && !empty($_POST['s']))
57
  {
58
+ $searchCriteria = sanitize_title_for_query($_POST['s']);
59
  $searchQuery = " WHERE title LIKE '%$searchCriteria%' ";
60
  }
61
  $query .= $searchQuery;
classes/sgDataTable/Table.php CHANGED
@@ -81,8 +81,8 @@ class SGPB_Table extends SGPB_ListTable
81
 
82
  $totalPages = ceil($totalItems/$perPage);
83
 
84
- $orderby = isset($_GET["orderby"]) ? $_GET["orderby"] : 'ASC';
85
- $order = isset($_GET["order"]) ? $_GET["order"] : '';
86
 
87
  if(isset($this->initialOrder) && empty($order)){
88
  foreach($this->initialOrder as $key=>$val){
81
 
82
  $totalPages = ceil($totalItems/$perPage);
83
 
84
+ $orderby = isset($_GET["orderby"]) ? sanitize_text_field($_GET["orderby"]) : 'ASC';
85
+ $order = isset($_GET["order"]) ? sanitize_text_field($_GET["order"]) : '';
86
 
87
  if(isset($this->initialOrder) && empty($order)){
88
  foreach($this->initialOrder as $key=>$val){
config.php CHANGED
@@ -24,8 +24,8 @@ if(!class_exists('SgPopupBuilderConfig')) {
24
  define('SG_APP_POPUP_JS', SG_APP_POPUP_PATH . '/javascript');
25
  define('SG_APP_POPUP_HELPERS', SG_APP_POPUP_PATH . '/helpers/');
26
  define('SG_APP_POPUP_TABLE_LIMIT', 15);
27
- define('SG_POPUP_VERSION', 2.53);
28
- define('SG_POPUP_PRO_VERSION', 3.23);
29
  define('SG_POPUP_PRO_URL', 'http://popup-builder.com/');
30
  define('SG_POPUP_EXTENSION_URL', 'http://popup-builder.com/extensions');
31
  define('SG_MAILCHIMP_EXTENSION_URL', 'http://popup-builder.com/downloads/mailchimp/');
24
  define('SG_APP_POPUP_JS', SG_APP_POPUP_PATH . '/javascript');
25
  define('SG_APP_POPUP_HELPERS', SG_APP_POPUP_PATH . '/helpers/');
26
  define('SG_APP_POPUP_TABLE_LIMIT', 15);
27
+ define('SG_POPUP_VERSION', 2.55);
28
+ define('SG_POPUP_PRO_VERSION', 3.25);
29
  define('SG_POPUP_PRO_URL', 'http://popup-builder.com/');
30
  define('SG_POPUP_EXTENSION_URL', 'http://popup-builder.com/extensions');
31
  define('SG_MAILCHIMP_EXTENSION_URL', 'http://popup-builder.com/downloads/mailchimp/');
files/options_section/fblike.php CHANGED
@@ -15,7 +15,7 @@
15
  </h3>
16
  <div class="special-options-content">
17
  <span class="liquid-width">Url:</span>
18
- <input class="input-width-static" type="text" name="fblike-like-url" value="<?php echo esc_attr(@$sgFblikeurl); ?>">
19
  <span class="liquid-width">Layout:</span>
20
  <?php echo sgCreateSelect($sgFbLikeButtons,'fblike-layout',esc_html(@$sgFbLikeLayout)); ?>
21
  </div>
15
  </h3>
16
  <div class="special-options-content">
17
  <span class="liquid-width">Url:</span>
18
+ <input class="input-width-static" type="text" name="fblike-like-url" value="<?php echo esc_url(@$sgFblikeurl); ?>">
19
  <span class="liquid-width">Layout:</span>
20
  <?php echo sgCreateSelect($sgFbLikeButtons,'fblike-layout',esc_html(@$sgFbLikeLayout)); ?>
21
  </div>
files/sg_admin_post.php CHANGED
@@ -32,7 +32,7 @@ function sgGetCsvFile() {
32
  add_action('admin_post_csv_file', 'sgGetCsvFile');
33
 
34
  function sgPopupClone() {
35
- $id = $_GET['id'];
36
  $obj = SGPopup::findById($id);
37
  $title = $obj->getTitle();
38
  $title .= "(clone)";
@@ -171,7 +171,9 @@ function sgSanitizeField($key, $isTextField = false) {
171
  function sgPopupSaveSettings() {
172
 
173
  global $wpdb;
174
-
 
 
175
  $st = $wpdb->prepare("SELECT options FROM ". $wpdb->prefix ."sg_popup_settings WHERE id = %d",1);
176
  $options = $wpdb->get_row($st, ARRAY_A);
177
 
32
  add_action('admin_post_csv_file', 'sgGetCsvFile');
33
 
34
  function sgPopupClone() {
35
+ $id = (int)$_GET['id'];
36
  $obj = SGPopup::findById($id);
37
  $title = $obj->getTitle();
38
  $title .= "(clone)";
171
  function sgPopupSaveSettings() {
172
 
173
  global $wpdb;
174
+ if(isset($_POST)) {
175
+ check_admin_referer('sgPopupBuilderSettings');
176
+ }
177
  $st = $wpdb->prepare("SELECT options FROM ". $wpdb->prefix ."sg_popup_settings WHERE id = %d",1);
178
  $options = $wpdb->get_row($st, ARRAY_A);
179
 
files/sg_functions.php CHANGED
@@ -69,6 +69,7 @@ class SGFunctions
69
 
70
  public static function addReview()
71
  {
 
72
  return '<div class="sg-info-panel-wrapper">
73
  <div class="sg-info-panel-row">
74
  <div class="sg-info-panel-col-3">
@@ -106,7 +107,7 @@ class SGFunctions
106
  </div>
107
  <div>
108
  <span class="sg-info-close">+</span>
109
- <span class="sg-dont-show-agin">Don’t show again.</span>
110
  </div>
111
  </div>';
112
  }
69
 
70
  public static function addReview()
71
  {
72
+ $ajaxNonce = wp_create_nonce("sgPopupBuilderReview");
73
  return '<div class="sg-info-panel-wrapper">
74
  <div class="sg-info-panel-row">
75
  <div class="sg-info-panel-col-3">
107
  </div>
108
  <div>
109
  <span class="sg-info-close">+</span>
110
+ <span class="sg-dont-show-agin" data-ajaxnonce="'.esc_attr($ajaxNonce).'">Don’t show again.</span>
111
  </div>
112
  </div>';
113
  }
files/sg_popup_ajax.php CHANGED
@@ -1,11 +1,21 @@
1
  <?php
 
 
 
 
 
 
 
2
 
3
  function sgPopupDelete()
4
  {
 
5
  $id = (int)@$_POST['popup_id'];
6
- if (!$id) {
 
7
  return;
8
  }
 
9
  require_once(SG_APP_POPUP_CLASSES.'/SGPopup.php');
10
  SGPopup::delete($id);
11
  SGPopup::removePopupFromPages($id);
@@ -19,11 +29,12 @@ add_action('wp_ajax_delete_popup', 'sgPopupDelete');
19
  function sgFrontend()
20
  {
21
  global $wpdb;
 
22
  parse_str($_POST['subsribers'], $subsribers);
23
- $email = $subsribers['subs-email-name'];
24
- $firstName = $subsribers['subs-first-name'];
25
- $lastName = $subsribers['subs-last-name'];
26
- $title = $subsribers['subs-popup-title'];
27
 
28
  $query = $wpdb->prepare("SELECT id FROM ". $wpdb->prefix ."sg_subscribers WHERE email = %s AND subscriptionType = %s", $email, $title);
29
  $list = $wpdb->get_row($query, ARRAY_A);
@@ -41,12 +52,14 @@ function sgContactForm()
41
  {
42
  global $wpdb;
43
  parse_str($_POST['contactParams'], $params);
44
- $adminMail = sanitize_text_field($_POST['receiveMail']);
45
- $popupTitle = sanitize_text_field($_POST['popupTitle']);
46
- $name = $params['contact-name'];
47
- $subject = $params['contact-subject'];
48
- $userMessage = $params['content-message'];
49
- $mail = $params['contact-email'];
 
 
50
 
51
 
52
  $message = '';
@@ -81,7 +94,8 @@ add_action('wp_ajax_contact_send_mail', 'sgContactForm');
81
  function sgImportPopups()
82
  {
83
  global $wpdb;
84
- $url = $_POST['attachmentUrl'];
 
85
 
86
  $contents = unserialize(base64_decode(file_get_contents($url)));
87
 
@@ -150,18 +164,24 @@ function sgImportPopups()
150
 
151
  add_action('wp_ajax_import_popups', 'sgImportPopups');
152
 
153
- function sgCloseReviewPanel() {
 
 
154
  update_option('SG_COLOSE_REVIEW_BLOCK', true);
155
  }
156
  add_action('wp_ajax_close_review_panel', 'sgCloseReviewPanel');
157
 
158
  function sgLazyLoading() {
159
 
 
160
  $popupId = (int)$_POST['popupId'];
 
 
 
161
  $params = "";
162
- $postType = $_POST['postType'];
163
  $loadingNumber = (int)$_POST['loadingNumber'];
164
- $customParams = $_POST['customParams'];
165
  $defArray = array();
166
 
167
  /* When load first time need add Home page in Wp pages */
@@ -226,11 +246,12 @@ add_action('wp_ajax_lazy_loading', 'sgLazyLoading');
226
  function addToSubscribers() {
227
 
228
  global $wpdb;
229
- $firstName = $_POST['firstName'];
230
- $lastName = $_POST['lastName'];
231
- $email = $_POST['email'];
232
- $subsType = $_POST['subsType'];
233
-
 
234
  foreach ($subsType as $subType) {
235
  $selectSql = $wpdb->prepare("SELECT id FROM ".$wpdb->prefix."sg_subscribers WHERE email=%s AND subscriptionType=%s", $email, $subType);
236
  $res = $wpdb->get_row($selectSql, ARRAY_A);
@@ -247,8 +268,8 @@ add_action('wp_ajax_add_to_subsribers', 'addToSubscribers');
247
  function sgDeleteSubscribers() {
248
 
249
  global $wpdb;
250
-
251
- $subsribersId = $_POST['subsribersId'];
252
  foreach ($subsribersId as $subsriberId) {
253
  $prepareSql = $wpdb->prepare("DELETE FROM ". $wpdb->prefix ."sg_subscribers WHERE id = %d",$subsriberId);
254
  $wpdb->query($prepareSql);
@@ -261,8 +282,9 @@ add_action('wp_ajax_subsribers_delete', 'sgDeleteSubscribers');
261
  function sgSendNewsletter() {
262
 
263
  global $wpdb;
 
264
  $newslatterData = $_POST['NewsLatterData'];
265
-
266
  /*Change to default status*/
267
  $updateStatusQuery = $wpdb->prepare("UPDATE ". $wpdb->prefix ."sg_subscribers SET status=0 where subscriptionType = %s",$newslatterData['subsFormType']);
268
  $wpdb->query($updateStatusQuery);
@@ -278,8 +300,9 @@ add_action('wp_ajax_send_newsletter', 'sgSendNewsletter');
278
  function sgIsHaveErrorLog() {
279
 
280
  global $wpdb;
 
281
  $countRows = '';
282
- $popupType = $_POST['subsType'];
283
 
284
  $getErrorCounteSql = $wpdb->prepare("SELECT count(*) FROM ". $wpdb->prefix ."sg_subscription_error_log WHERE popupType=%s",$popupType);
285
  $countRows = $wpdb->get_var($getErrorCounteSql);
@@ -290,10 +313,11 @@ function sgIsHaveErrorLog() {
290
  add_action('wp_ajax_subs_error_log_count', 'sgIsHaveErrorLog');
291
 
292
  function sgChangePopupStatus() {
 
293
  $popupId = (int)$_POST['popupId'];
294
  $obj = SGPopup::findById($popupId);
295
  $options = json_decode($obj->getOptions(), true);
296
- $options['isActiveStatus'] = $_POST['popupStatus'];
297
  $obj->setOptions(json_encode($options));
298
  $obj->save();
299
  }
1
  <?php
2
+ //sanitizing and validating input before any action
3
+ function sgSanitizeAjaxField($optionValue, $isTextField = false) {
4
+ /*TODO: Extend function for other sanitization and validation actions*/
5
+ if(!$isTextField) {
6
+ return sanitize_text_field($optionValue);
7
+ }
8
+ }
9
 
10
  function sgPopupDelete()
11
  {
12
+ check_ajax_referer('sgPopupBuilderDeleteNonce', 'ajaxNonce');
13
  $id = (int)@$_POST['popup_id'];
14
+
15
+ if($id == 0 || !$id) {
16
  return;
17
  }
18
+
19
  require_once(SG_APP_POPUP_CLASSES.'/SGPopup.php');
20
  SGPopup::delete($id);
21
  SGPopup::removePopupFromPages($id);
29
  function sgFrontend()
30
  {
31
  global $wpdb;
32
+ check_ajax_referer('sgPopupBuilderSubsNonce', 'subsSecurity');
33
  parse_str($_POST['subsribers'], $subsribers);
34
+ $email = sanitize_email($subsribers['subs-email-name']);
35
+ $firstName = sgSanitizeAjaxField($subsribers['subs-first-name']);
36
+ $lastName = sgSanitizeAjaxField($subsribers['subs-last-name']);
37
+ $title = sanitize_title($subsribers['subs-popup-title']);
38
 
39
  $query = $wpdb->prepare("SELECT id FROM ". $wpdb->prefix ."sg_subscribers WHERE email = %s AND subscriptionType = %s", $email, $title);
40
  $list = $wpdb->get_row($query, ARRAY_A);
52
  {
53
  global $wpdb;
54
  parse_str($_POST['contactParams'], $params);
55
+ //CSRF CHECK
56
+ check_ajax_referer('sgPopupBuilderContactNonce', 'contactSecurity');
57
+ $adminMail = sanitize_email($_POST['receiveMail']);
58
+ $popupTitle = sanitize_title($_POST['popupTitle']);
59
+ $name = sgSanitizeAjaxField($params['contact-name']);
60
+ $subject = sgSanitizeAjaxField($params['contact-subject']);
61
+ $userMessage = sgSanitizeAjaxField($params['content-message']);
62
+ $mail = sanitize_email($params['contact-email']);
63
 
64
 
65
  $message = '';
94
  function sgImportPopups()
95
  {
96
  global $wpdb;
97
+ check_ajax_referer('sgPopupBuilderImportNonce', 'ajaxNonce');
98
+ $url = sgSanitizeAjaxField($_POST['attachmentUrl']);
99
 
100
  $contents = unserialize(base64_decode(file_get_contents($url)));
101
 
164
 
165
  add_action('wp_ajax_import_popups', 'sgImportPopups');
166
 
167
+ function sgCloseReviewPanel()
168
+ {
169
+ check_ajax_referer('sgPopupBuilderReview', 'ajaxNonce');
170
  update_option('SG_COLOSE_REVIEW_BLOCK', true);
171
  }
172
  add_action('wp_ajax_close_review_panel', 'sgCloseReviewPanel');
173
 
174
  function sgLazyLoading() {
175
 
176
+ check_ajax_referer('sgPopupBuilderPageNonce', 'ajaxNonce');
177
  $popupId = (int)$_POST['popupId'];
178
+ if($popupId == 0) {
179
+ return;
180
+ }
181
  $params = "";
182
+ $postType = sgSanitizeAjaxField($_POST['postType']);
183
  $loadingNumber = (int)$_POST['loadingNumber'];
184
+ $customParams = sgSanitizeAjaxField($_POST['customParams']);
185
  $defArray = array();
186
 
187
  /* When load first time need add Home page in Wp pages */
246
  function addToSubscribers() {
247
 
248
  global $wpdb;
249
+ check_ajax_referer('sgPopupBuilderAddSubsToListNonce', 'ajaxNonce');
250
+ $firstName = sgSanitizeAjaxField($_POST['firstName']);
251
+ $lastName = sgSanitizeAjaxField($_POST['lastName']);
252
+ $email = sanitize_email($_POST['email']);
253
+ $subsType = array_map( 'sanitize_text_field', $_POST['subsType']);
254
+
255
  foreach ($subsType as $subType) {
256
  $selectSql = $wpdb->prepare("SELECT id FROM ".$wpdb->prefix."sg_subscribers WHERE email=%s AND subscriptionType=%s", $email, $subType);
257
  $res = $wpdb->get_row($selectSql, ARRAY_A);
268
  function sgDeleteSubscribers() {
269
 
270
  global $wpdb;
271
+ check_ajax_referer('sgPopupBuilderAddSubsNonce', 'ajaxNonce');
272
+ $subsribersId = array_map( 'sanitize_text_field', $_POST['subsribersId']);
273
  foreach ($subsribersId as $subsriberId) {
274
  $prepareSql = $wpdb->prepare("DELETE FROM ". $wpdb->prefix ."sg_subscribers WHERE id = %d",$subsriberId);
275
  $wpdb->query($prepareSql);
282
  function sgSendNewsletter() {
283
 
284
  global $wpdb;
285
+ check_ajax_referer('sgPopupBuilderNewsletterNonce', 'ajaxNonce');
286
  $newslatterData = $_POST['NewsLatterData'];
287
+ $newslatterData = array_map( 'sanitize_text_field', $newslatterData);
288
  /*Change to default status*/
289
  $updateStatusQuery = $wpdb->prepare("UPDATE ". $wpdb->prefix ."sg_subscribers SET status=0 where subscriptionType = %s",$newslatterData['subsFormType']);
290
  $wpdb->query($updateStatusQuery);
300
  function sgIsHaveErrorLog() {
301
 
302
  global $wpdb;
303
+ check_ajax_referer('sgPopupBuilderSubsLogNonce', 'ajaxNonce');
304
  $countRows = '';
305
+ $popupType = sgSanitizeAjaxField($_POST['subsType']);
306
 
307
  $getErrorCounteSql = $wpdb->prepare("SELECT count(*) FROM ". $wpdb->prefix ."sg_subscription_error_log WHERE popupType=%s",$popupType);
308
  $countRows = $wpdb->get_var($getErrorCounteSql);
313
  add_action('wp_ajax_subs_error_log_count', 'sgIsHaveErrorLog');
314
 
315
  function sgChangePopupStatus() {
316
+ check_ajax_referer('sgPopupBuilderNewsletterNonce', 'ajaxNonce');
317
  $popupId = (int)$_POST['popupId'];
318
  $obj = SGPopup::findById($popupId);
319
  $options = json_decode($obj->getOptions(), true);
320
+ $options['isActiveStatus'] = sgSanitizeAjaxField($_POST['popupStatus']);
321
  $obj->setOptions(json_encode($options));
322
  $obj->save();
323
  }
files/sg_popup_create_new.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  $extensionManagerObj = new SGPBExtensionManager();
3
 
4
- $popupType = @$_GET['type'];
5
  if (!$popupType) {
6
  $popupType = 'html';
7
  }
@@ -26,7 +26,11 @@ if (isset($_GET['id'])) {
26
  $id = (int)$_GET['id'];
27
  $result = call_user_func(array($popupClassName, 'findById'), $id);
28
  if (!$result) {
29
- wp_redirect(SG_APP_POPUP_ADMIN_URL."page=edit-popup&type=".$popupType."");
 
 
 
 
30
  }
31
 
32
  switch ($popupType) {
@@ -41,9 +45,11 @@ if (isset($_GET['id'])) {
41
  $sgPopupDataImage = $result->getUrl();
42
  break;
43
  case 'html':
 
44
  $sgPopupDataHtml = $result->getContent();
45
  break;
46
  case 'fblike':
 
47
  $sgPopupDataFblike = $result->getContent();
48
  $sgFlikeOptions = $result->getFblikeOptions();
49
  break;
@@ -51,6 +57,7 @@ if (isset($_GET['id'])) {
51
  $sgPopupDataShortcode = $result->getShortcode();
52
  break;
53
  case 'ageRestriction':
 
54
  $sgPopupAgeRestriction = ($result->getContent());
55
  $sgYesButton = sgSafeStr($result->getYesButton());
56
  $sgNoButton = sgSafeStr($result->getNoButton());
@@ -765,7 +772,7 @@ function sgCreateRadioElements($radioElements,$checkedValue)
765
  if ($checkedValue == $value) {
766
  $checked = 'checked';
767
  }
768
- $content .= '<span class="liquid-width"><input class="radio-btn-fix" type="radio" name="'.$name.'" value="'.$value.'" '.$checked.'>';
769
  $content .= $additionalHtml."<br>";
770
  }
771
  return $content;
@@ -784,6 +791,7 @@ $contentClickOptions = array(
784
  )
785
  );
786
 
 
787
  $pagesRadio = array(
788
  array(
789
  "title" => "show on all pages:",
@@ -798,7 +806,8 @@ $pagesRadio = array(
798
  "data-name" => SG_POST_TYPE_PAGE,
799
  "data-popupid" => $dataPopupId,
800
  "data-loading-number" => 0,
801
- "data-selectbox-role" => "js-all-pages"
 
802
  )
803
  )
804
  );
@@ -817,7 +826,8 @@ $postsRadio = array(
817
  "data-name" => SG_POST_TYPE_POST,
818
  "data-popupid" => $dataPopupId,
819
  "data-loading-number" => 0,
820
- "data-selectbox-role" => "js-all-posts"
 
821
  )
822
 
823
  ),
@@ -826,7 +836,8 @@ $postsRadio = array(
826
  "value" => "allCategories",
827
  "info" => "",
828
  "data-attributes" => array(
829
- "class" => 'js-all-categories'
 
830
  )
831
  )
832
  );
@@ -939,12 +950,12 @@ function createRadiobuttons($elements, $name, $newLine, $selectedInput, $class)
939
  $attrStr = '';
940
  if(isset($element['data-attributes'])) {
941
  foreach ($element['data-attributes'] as $key => $dataValue) {
942
- $attrStr .= $key.'="'.$dataValue.'" ';
943
  }
944
  }
945
 
946
  $str .= "<span class=".$class.">".$element['title']."</span>
947
- <input type=\"radio\" name=".$name." ".$attrStr." value=".$value." $checked>".$infoIcon.$breakLine;
948
  }
949
 
950
  echo $str;
@@ -1088,7 +1099,7 @@ function sgCreateSelect($options,$name,$selecteOption)
1088
  if ($checked == ''){
1089
  $checked = "checked";
1090
  }
1091
- $str = "<input type='radio' name=\"$name\" value=\"".$firstOption."\" $checked class='popup_theme_name' sgPoupNumber='1'>".$str;
1092
  return $str;
1093
  }
1094
  else {
@@ -1102,7 +1113,7 @@ function sgCreateSelect($options,$name,$selecteOption)
1102
  $selected = 'selected';
1103
  }
1104
 
1105
- $str .= "<option value='".$key."' ".$selected." >$option</potion>";
1106
  }
1107
 
1108
  $str .="</select>" ;
@@ -1125,6 +1136,11 @@ if (isset($_GET["titleError"])): ?>
1125
  </div>
1126
  <?php endif; ?>
1127
  <form method="POST" action="<?php echo SG_APP_POPUP_ADMIN_URL;?>admin-post.php" id="add-form">
 
 
 
 
 
1128
  <input type="hidden" name="action" value="<?php echo $currentActionName;?>">
1129
  <div class="crud-wrapper">
1130
  <div class="cereate-title-wrapper">
1
  <?php
2
  $extensionManagerObj = new SGPBExtensionManager();
3
 
4
+ $popupType = @sanitize_text_field($_GET['type']);
5
  if (!$popupType) {
6
  $popupType = 'html';
7
  }
26
  $id = (int)$_GET['id'];
27
  $result = call_user_func(array($popupClassName, 'findById'), $id);
28
  if (!$result) {
29
+ $redirectUrl = add_query_arg( array(
30
+ 'type' => $popupType,
31
+ ), SG_APP_POPUP_ADMIN_URL."admin.php?page=edit-popup");
32
+
33
+ wp_safe_redirect($redirectUrl);
34
  }
35
 
36
  switch ($popupType) {
45
  $sgPopupDataImage = $result->getUrl();
46
  break;
47
  case 'html':
48
+ //We cannot escape this input because the data is raw HTML
49
  $sgPopupDataHtml = $result->getContent();
50
  break;
51
  case 'fblike':
52
+ //We cannot escape this input because the data is raw HTML
53
  $sgPopupDataFblike = $result->getContent();
54
  $sgFlikeOptions = $result->getFblikeOptions();
55
  break;
57
  $sgPopupDataShortcode = $result->getShortcode();
58
  break;
59
  case 'ageRestriction':
60
+ //We cannot escape this input because the data is raw HTML
61
  $sgPopupAgeRestriction = ($result->getContent());
62
  $sgYesButton = sgSafeStr($result->getYesButton());
63
  $sgNoButton = sgSafeStr($result->getNoButton());
772
  if ($checkedValue == $value) {
773
  $checked = 'checked';
774
  }
775
+ $content .= '<span class="liquid-width"><input class="radio-btn-fix" type="radio" name="'.esc_attr($name).'" value="'.esc_attr($value).'" '.esc_attr($checked).'>';
776
  $content .= $additionalHtml."<br>";
777
  }
778
  return $content;
791
  )
792
  );
793
 
794
+ $ajaxNonce = wp_create_nonce("sgPopupBuilderPageNonce");
795
  $pagesRadio = array(
796
  array(
797
  "title" => "show on all pages:",
806
  "data-name" => SG_POST_TYPE_PAGE,
807
  "data-popupid" => $dataPopupId,
808
  "data-loading-number" => 0,
809
+ "data-selectbox-role" => "js-all-pages",
810
+ "data-ajaxNonce" => $ajaxNonce
811
  )
812
  )
813
  );
826
  "data-name" => SG_POST_TYPE_POST,
827
  "data-popupid" => $dataPopupId,
828
  "data-loading-number" => 0,
829
+ "data-selectbox-role" => "js-all-posts",
830
+ "data-ajaxNonce" => $ajaxNonce
831
  )
832
 
833
  ),
836
  "value" => "allCategories",
837
  "info" => "",
838
  "data-attributes" => array(
839
+ "class" => 'js-all-categories',
840
+ "data-ajaxNonce" => $ajaxNonce
841
  )
842
  )
843
  );
950
  $attrStr = '';
951
  if(isset($element['data-attributes'])) {
952
  foreach ($element['data-attributes'] as $key => $dataValue) {
953
+ $attrStr .= $key.'="'.esc_attr($dataValue).'" ';
954
  }
955
  }
956
 
957
  $str .= "<span class=".$class.">".$element['title']."</span>
958
+ <input type=\"radio\" name=".esc_attr($name)." ".$attrStr." value=".esc_attr($value)." $checked>".$infoIcon.$breakLine;
959
  }
960
 
961
  echo $str;
1099
  if ($checked == ''){
1100
  $checked = "checked";
1101
  }
1102
+ $str = "<input type='radio' name=\"".esc_attr($name)."\" value=\"".esc_attr($firstOption)."\" $checked class='popup_theme_name' sgPoupNumber='1'>".$str;
1103
  return $str;
1104
  }
1105
  else {
1113
  $selected = 'selected';
1114
  }
1115
 
1116
+ $str .= "<option value='".esc_attr($key)."' ".$selected." >$option</potion>";
1117
  }
1118
 
1119
  $str .="</select>" ;
1136
  </div>
1137
  <?php endif; ?>
1138
  <form method="POST" action="<?php echo SG_APP_POPUP_ADMIN_URL;?>admin-post.php" id="add-form">
1139
+ <?php
1140
+ if(function_exists('wp_nonce_field')) {
1141
+ wp_nonce_field('sgPopupBuilderSave');
1142
+ }
1143
+ ?>
1144
  <input type="hidden" name="action" value="<?php echo $currentActionName;?>">
1145
  <div class="crud-wrapper">
1146
  <div class="cereate-title-wrapper">
files/sg_popup_main.php CHANGED
@@ -5,6 +5,7 @@ $allData = SGPopup::findAll();
5
  if(!SG_SHOW_POPUP_REVIEW) {
6
  echo SGFunctions::addReview();
7
  }
 
8
  ?>
9
  <div class="wrap">
10
  <div class="headers-wrapper">
@@ -17,7 +18,7 @@ if(!SG_SHOW_POPUP_REVIEW) {
17
  <?php if(!empty($allData)):?>
18
  <a href= "admin-post.php?action=popup_export" ><input type="button" value="Export" class="button"></a>
19
  <?php endif;?>
20
- <input id="js-upload-export-file" class="button" type="button" value="Import"><img src="<?php echo plugins_url('img/wpAjax.gif', dirname(__FILE__).'../'); ?>" alt="gif" class="sg-hide-element js-sg-import-gif">
21
  </div>
22
  <div class="clear"></div>
23
  <?php endif; ?>
5
  if(!SG_SHOW_POPUP_REVIEW) {
6
  echo SGFunctions::addReview();
7
  }
8
+ $ajaxNonce = wp_create_nonce("sgPopupBuilderImportNonce");
9
  ?>
10
  <div class="wrap">
11
  <div class="headers-wrapper">
18
  <?php if(!empty($allData)):?>
19
  <a href= "admin-post.php?action=popup_export" ><input type="button" value="Export" class="button"></a>
20
  <?php endif;?>
21
+ <input id="js-upload-export-file" data-ajaxNonce="<?php echo esc_attr($ajaxNonce); ?>" class="button" type="button" value="Import"><img src="<?php echo plugins_url('img/wpAjax.gif', dirname(__FILE__).'../'); ?>" alt="gif" class="sg-hide-element js-sg-import-gif">
22
  </div>
23
  <div class="clear"></div>
24
  <?php endif; ?>
files/sg_popup_page_selection.php CHANGED
@@ -39,7 +39,7 @@ function sgPopupCallback($post)
39
  $selected = "selected";
40
  }
41
 
42
- $str .= "<option value='".$id."' disable='".$id."' ".$selected." >$title - $type</option>";
43
  }
44
  }
45
  $str .="</select>" ;
@@ -59,12 +59,13 @@ function sgPopupCallback($post)
59
 
60
  function sgSelectPopupSaved($post_id)
61
  {
 
62
  if(empty($_POST['sg_promotional_popup'])) {
63
  delete_post_meta($post_id, 'sg_promotional_popup');
64
  return false;
65
  }
66
  else {
67
- update_post_meta($post_id, 'sg_promotional_popup' , $_POST['sg_promotional_popup']);
68
  }
69
  }
70
 
39
  $selected = "selected";
40
  }
41
 
42
+ $str .= "<option value='".$id."' disable='".$id."' ".esc_attr($selected)." >".esc_html($title .'-'. $type)."</option>";
43
  }
44
  }
45
  $str .="</select>" ;
59
 
60
  function sgSelectPopupSaved($post_id)
61
  {
62
+ $post_id = (int)$post_id;
63
  if(empty($_POST['sg_promotional_popup'])) {
64
  delete_post_meta($post_id, 'sg_promotional_popup');
65
  return false;
66
  }
67
  else {
68
+ update_post_meta($post_id, 'sg_promotional_popup' , (int)$_POST['sg_promotional_popup']);
69
  }
70
  }
71
 
files/sg_popup_save.php CHANGED
@@ -34,6 +34,10 @@ function sgSanitize($optionsKey, $isTextField = false)
34
  function sgPopupSave()
35
  {
36
  global $wpdb;
 
 
 
 
37
  /*Removing all added slashes*/
38
  $_POST = stripslashes_deep($_POST);
39
  $postData = $_POST;
@@ -72,7 +76,7 @@ function sgPopupSave()
72
  'sgRoundButton' => sgSanitize('sgRoundButton'),
73
  'fbShareLabel' => sgSanitize('fbShareLabel'),
74
  'lindkinLabel' => sgSanitize('lindkinLabel'),
75
- 'sgShareUrl' => sgSanitize('sgShareUrl'),
76
  'shareUrlType' => sgSanitize('shareUrlType'),
77
  'googLelabel' => sgSanitize('googLelabel'),
78
  'twitterLabel' => sgSanitize('twitterLabel'),
@@ -116,13 +120,14 @@ function sgPopupSave()
116
  $subscriptionOptions = array(
117
  'subs-first-name-status' => sgSanitize('subs-first-name-status'),
118
  'subs-last-name-status' => sgSanitize('subs-last-name-status'),
 
119
  'subscription-email' => sgSanitize('subscription-email'),
120
  'subs-first-name' => sgSanitize('subs-first-name'),
121
  'subs-last-name' => sgSanitize('subs-last-name'),
122
  'subs-text-width' => sgSanitize('subs-text-width'),
123
  'subs-button-bgColor' => sgSanitize('subs-button-bgColor'),
124
  'subs-btn-width' => sgSanitize('subs-btn-width'),
125
- 'subs-btn-title' => sgSanitize('subs-btn-title'),
126
  'subs-text-input-bgColor' => sgSanitize('subs-text-input-bgColor'),
127
  'subs-text-borderColor' => sgSanitize('subs-text-borderColor'),
128
  'subs-button-color' => sgSanitize('subs-button-color'),
@@ -135,7 +140,7 @@ function sgPopupSave()
135
  'subs-btn-progress-title' => sgSanitize('subs-btn-progress-title'),
136
  'subs-text-border-width' => sgSanitize('subs-text-border-width'),
137
  'subs-success-behavior' => sgSanitize('subs-success-behavior'),
138
- 'subs-success-redirect-url' => sgSanitize('subs-success-redirect-url'),
139
  'subs-success-popups-list' => sgSanitize('subs-success-popups-list')
140
  );
141
 
@@ -146,6 +151,7 @@ function sgPopupSave()
146
  'contact-subject' => sgSanitize('contact-subject'),
147
  'contact-subject-status' => sgSanitize('contact-subject-status'),
148
  'contact-subject-required' => sgSanitize('contact-subject-required'),
 
149
  'contact-email' => sgSanitize('contact-email'),
150
  'contact-message' => sgSanitize('contact-message'),
151
  'contact-validation-message' => sgSanitize('contact-validation-message'),
@@ -159,15 +165,15 @@ function sgPopupSave()
159
  'contact-placeholder-color' => sgSanitize('contact-placeholder-color'),
160
  'contact-btn-width' => sgSanitize('contact-btn-width'),
161
  'contact-btn-height' => sgSanitize('contact-btn-height'),
162
- 'contact-btn-title' => sgSanitize('contact-btn-title'),
163
- 'contact-btn-progress-title' => sgSanitize('contact-btn-progress-title'),
164
  'contact-button-bgcolor' => sgSanitize('contact-button-bgcolor'),
165
  'contact-button-color' => sgSanitize('contact-button-color'),
166
  'contact-area-width' => sgSanitize('contact-area-width'),
167
  'contact-area-height' => sgSanitize('contact-area-height'),
168
  'sg-contact-resize' => sgSanitize('sg-contact-resize'),
169
  'contact-validate-email' => sgSanitize('contact-validate-email'),
170
- 'contact-receive-email' => sgSanitize('contact-receive-email'),
171
  'contact-fail-message' => sgSanitize('contact-fail-message'),
172
  'show-form-to-top' => sgSanitize('show-form-to-top'),
173
  'contact-success-behavior' => sgSanitize('contact-success-behavior'),
@@ -178,7 +184,7 @@ function sgPopupSave()
178
  );
179
 
180
  $fblikeOptions = array(
181
- 'fblike-like-url' => sgSanitize('fblike-like-url'),
182
  'fblike-layout' => sgSanitize('fblike-layout')
183
  );
184
 
@@ -247,10 +253,15 @@ function sgPopupSave()
247
  }
248
 
249
  if (empty($title)) {
250
- wp_redirect(SG_APP_POPUP_ADMIN_URL."admin.php?page=edit-popup&type=$type&titleError=1");
 
 
 
 
 
251
  exit();
252
  }
253
- $popupName = "SG".ucfirst(strtolower($_POST['type']));
254
  $popupClassName = $popupName."Popup";
255
 
256
  require_once(SG_APP_POPUP_PATH ."/classes/".$popupClassName.".php");
@@ -304,7 +315,14 @@ function sgPopupSave()
304
  }
305
 
306
  setOptionPopupType($lastId, $type);
307
- wp_redirect(SG_APP_POPUP_ADMIN_URL."admin.php?page=edit-popup&id=".$lastId."&type=$type&saved=1");
 
 
 
 
 
 
 
308
  exit();
309
  }
310
  else {
@@ -417,7 +435,14 @@ function sgPopupSave()
417
  $extensionManagerObj->setPostData($postData);
418
  $extensionManagerObj->save();
419
  $popup->save();
420
- wp_redirect(SG_APP_POPUP_ADMIN_URL."admin.php?page=edit-popup&id=$id&type=$type&saved=1");
 
 
 
 
 
 
 
421
  exit();
422
  }
423
 
34
  function sgPopupSave()
35
  {
36
  global $wpdb;
37
+
38
+ if(isset($_POST)) {
39
+ check_admin_referer('sgPopupBuilderSave');
40
+ }
41
  /*Removing all added slashes*/
42
  $_POST = stripslashes_deep($_POST);
43
  $postData = $_POST;
76
  'sgRoundButton' => sgSanitize('sgRoundButton'),
77
  'fbShareLabel' => sgSanitize('fbShareLabel'),
78
  'lindkinLabel' => sgSanitize('lindkinLabel'),
79
+ 'sgShareUrl' => esc_url_raw($_POST['sgShareUrl']),
80
  'shareUrlType' => sgSanitize('shareUrlType'),
81
  'googLelabel' => sgSanitize('googLelabel'),
82
  'twitterLabel' => sgSanitize('twitterLabel'),
120
  $subscriptionOptions = array(
121
  'subs-first-name-status' => sgSanitize('subs-first-name-status'),
122
  'subs-last-name-status' => sgSanitize('subs-last-name-status'),
123
+ // email input placeholder text
124
  'subscription-email' => sgSanitize('subscription-email'),
125
  'subs-first-name' => sgSanitize('subs-first-name'),
126
  'subs-last-name' => sgSanitize('subs-last-name'),
127
  'subs-text-width' => sgSanitize('subs-text-width'),
128
  'subs-button-bgColor' => sgSanitize('subs-button-bgColor'),
129
  'subs-btn-width' => sgSanitize('subs-btn-width'),
130
+ 'subs-btn-title' => sanitize_title($_POST['subs-btn-title']),
131
  'subs-text-input-bgColor' => sgSanitize('subs-text-input-bgColor'),
132
  'subs-text-borderColor' => sgSanitize('subs-text-borderColor'),
133
  'subs-button-color' => sgSanitize('subs-button-color'),
140
  'subs-btn-progress-title' => sgSanitize('subs-btn-progress-title'),
141
  'subs-text-border-width' => sgSanitize('subs-text-border-width'),
142
  'subs-success-behavior' => sgSanitize('subs-success-behavior'),
143
+ 'subs-success-redirect-url' => esc_url_raw($_POST['subs-success-redirect-url']),
144
  'subs-success-popups-list' => sgSanitize('subs-success-popups-list')
145
  );
146
 
151
  'contact-subject' => sgSanitize('contact-subject'),
152
  'contact-subject-status' => sgSanitize('contact-subject-status'),
153
  'contact-subject-required' => sgSanitize('contact-subject-required'),
154
+ // email input placeholder text(string)
155
  'contact-email' => sgSanitize('contact-email'),
156
  'contact-message' => sgSanitize('contact-message'),
157
  'contact-validation-message' => sgSanitize('contact-validation-message'),
165
  'contact-placeholder-color' => sgSanitize('contact-placeholder-color'),
166
  'contact-btn-width' => sgSanitize('contact-btn-width'),
167
  'contact-btn-height' => sgSanitize('contact-btn-height'),
168
+ 'contact-btn-title' => sanitize_title($_POST['contact-btn-title']),
169
+ 'contact-btn-progress-title' => sanitize_title($_POST['contact-btn-progress-title']),
170
  'contact-button-bgcolor' => sgSanitize('contact-button-bgcolor'),
171
  'contact-button-color' => sgSanitize('contact-button-color'),
172
  'contact-area-width' => sgSanitize('contact-area-width'),
173
  'contact-area-height' => sgSanitize('contact-area-height'),
174
  'sg-contact-resize' => sgSanitize('sg-contact-resize'),
175
  'contact-validate-email' => sgSanitize('contact-validate-email'),
176
+ 'contact-receive-email' => sanitize_email($_POST['contact-receive-email']),
177
  'contact-fail-message' => sgSanitize('contact-fail-message'),
178
  'show-form-to-top' => sgSanitize('show-form-to-top'),
179
  'contact-success-behavior' => sgSanitize('contact-success-behavior'),
184
  );
185
 
186
  $fblikeOptions = array(
187
+ 'fblike-like-url' => esc_url_raw($_POST['fblike-like-url']),
188
  'fblike-layout' => sgSanitize('fblike-layout')
189
  );
190
 
253
  }
254
 
255
  if (empty($title)) {
256
+ $redirectUrl = add_query_arg( array(
257
+ 'titleError' => 1,
258
+ 'type' => $type,
259
+ ), SG_APP_POPUP_ADMIN_URL."admin.php?page=edit-popup");
260
+
261
+ wp_safe_redirect($redirectUrl);
262
  exit();
263
  }
264
+ $popupName = "SG".sanitize_text_field(ucfirst(strtolower($_POST['type'])));
265
  $popupClassName = $popupName."Popup";
266
 
267
  require_once(SG_APP_POPUP_PATH ."/classes/".$popupClassName.".php");
315
  }
316
 
317
  setOptionPopupType($lastId, $type);
318
+
319
+ $redirectUrl = add_query_arg( array(
320
+ 'id' => $lastId,
321
+ 'saved' => 1,
322
+ 'type' => $type,
323
+ ), SG_APP_POPUP_ADMIN_URL."admin.php?page=edit-popup");
324
+
325
+ wp_safe_redirect($redirectUrl);
326
  exit();
327
  }
328
  else {
435
  $extensionManagerObj->setPostData($postData);
436
  $extensionManagerObj->save();
437
  $popup->save();
438
+
439
+ $redirectUrl = add_query_arg( array(
440
+ 'id' => $id,
441
+ 'saved' => 1,
442
+ 'type' => $type,
443
+ ), SG_APP_POPUP_ADMIN_URL."admin.php?page=edit-popup");
444
+
445
+ wp_safe_redirect($redirectUrl);
446
  exit();
447
  }
448
 
files/sg_popup_settings.php CHANGED
@@ -22,6 +22,11 @@ if (isset($_GET['saved']) && $_GET['saved']==1) {
22
  </h3>
23
  <div class="special-options-content">
24
  <form method="POST" action="<?php echo SG_APP_POPUP_ADMIN_URL;?>admin-post.php?action=save_settings" id="sg-settings-form">
 
 
 
 
 
25
  <span class="liquid-width">Delete popup data:</span>
26
  <input type="checkbox" name="tables-delete-status" <?php echo $tableDeleteSatatus;?>>
27
  <br><span class="liquid-width sg-aligin-with-multiselect">User role who can use plugin:</span>
22
  </h3>
23
  <div class="special-options-content">
24
  <form method="POST" action="<?php echo SG_APP_POPUP_ADMIN_URL;?>admin-post.php?action=save_settings" id="sg-settings-form">
25
+ <?php
26
+ if(function_exists('wp_nonce_field')) {
27
+ wp_nonce_field('sgPopupBuilderSettings');
28
+ }
29
+ ?>
30
  <span class="liquid-width">Delete popup data:</span>
31
  <input type="checkbox" name="tables-delete-status" <?php echo $tableDeleteSatatus;?>>
32
  <br><span class="liquid-width sg-aligin-with-multiselect">User role who can use plugin:</span>
javascript/sg_popup_backend.js CHANGED
@@ -1 +1 @@
1
- function beckend() {
2
  this.titleNotEmpty(); /* Check title is Empty */
3
  this.showThemePicture(); /* Show themes pictures */
4
  this.showEffects(); /* Show effect type */
5
  this.pageAcordion(); /* For page accordion divs */
6
  this.fixedPostionSelection(); /* Functionality for selected position */
7
  this.showInfo(); /* Show description options */
8
  this.opacityRange();
9
  this.subOptionContents();
10
  this.addCountries();
11
  this.showCloseTextFieldForTheme();
12
  this.popupReview();
13
  this.colorPicekr(); /* Color picker */
14
  this.switchPopupActive();
15
  this.initAccordions();
16
  });
17
  jQuery('.sg-info-close').on('click', function() {
18
  jQuery( ".sg-info-panel-wrapper" ).hide(300);
19
  });
20
  this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"showMessage", jQuery('.js-subs-success-message-content'));
21
  this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"redirectToUrl", jQuery('.js-subs-success-redirect-content'));
22
  this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"openPopup", jQuery('.js-subs-success-popups-list-content'));
23
  checkedElement.after(toggleContnet.css({'display':'inline-block'}));
 
24
  this.titleNotEmpty(); /* Check title is Empty */
25
  this.showThemePicture(); /* Show themes pictures */
26
  this.showEffects(); /* Show effect type */
27
  this.pageAcordion(); /* For page accordion divs */
28
  this.fixedPostionSelection(); /* Functionality for selected position */
29
  this.showInfo(); /* Show description options */
30
  this.opacityRange();
31
  this.subOptionContents();
32
  this.addCountries();
33
  this.showCloseTextFieldForTheme();
34
  this.popupReview();
35
  this.colorPicekr(); /* Color picker */
36
  this.switchPopupActive();
37
  this.initAccordions();
38
  });
39
  jQuery('.sg-info-close').on('click', function() {
40
  jQuery( ".sg-info-panel-wrapper" ).hide(300);
41
  });
42
  this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"showMessage", jQuery('.js-subs-success-message-content'));
43
  this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"redirectToUrl", jQuery('.js-subs-success-redirect-content'));
44
  this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"openPopup", jQuery('.js-subs-success-popups-list-content'));
45
  checkedElement.after(toggleContnet.css({'display':'inline-block'}));
 
1
  this.titleNotEmpty(); /* Check title is Empty */
2
  this.showThemePicture(); /* Show themes pictures */
3
  this.showEffects(); /* Show effect type */
4
  this.pageAcordion(); /* For page accordion divs */
5
  this.fixedPostionSelection(); /* Functionality for selected position */
6
  this.showInfo(); /* Show description options */
7
  this.opacityRange();
8
  this.subOptionContents();
9
  this.addCountries();
10
  this.showCloseTextFieldForTheme();
11
  this.popupReview();
12
  this.colorPicekr(); /* Color picker */
13
  this.switchPopupActive();
14
  this.initAccordions();
15
  });
16
  jQuery('.sg-info-close').on('click', function() {
17
  jQuery( ".sg-info-panel-wrapper" ).hide(300);
18
  });
19
  this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"showMessage", jQuery('.js-subs-success-message-content'));
20
  this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"redirectToUrl", jQuery('.js-subs-success-redirect-content'));
21
  this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"openPopup", jQuery('.js-subs-success-popups-list-content'));
22
  checkedElement.after(toggleContnet.css({'display':'inline-block'}));
23
+ function beckend() {
24
  this.titleNotEmpty(); /* Check title is Empty */
25
  this.showThemePicture(); /* Show themes pictures */
26
  this.showEffects(); /* Show effect type */
27
  this.pageAcordion(); /* For page accordion divs */
28
  this.fixedPostionSelection(); /* Functionality for selected position */
29
  this.showInfo(); /* Show description options */
30
  this.opacityRange();
31
  this.subOptionContents();
32
  this.addCountries();
33
  this.showCloseTextFieldForTheme();
34
  this.popupReview();
35
  this.colorPicekr(); /* Color picker */
36
  this.switchPopupActive();
37
  this.initAccordions();
38
  });
39
  jQuery('.sg-info-close').on('click', function() {
40
  jQuery( ".sg-info-panel-wrapper" ).hide(300);
41
  });
42
  this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"showMessage", jQuery('.js-subs-success-message-content'));
43
  this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"redirectToUrl", jQuery('.js-subs-success-redirect-content'));
44
  this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"openPopup", jQuery('.js-subs-success-popups-list-content'));
45
  checkedElement.after(toggleContnet.css({'display':'inline-block'}));
popup-builder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Popup Builder
4
  * Plugin URI: http://sygnoos.com
5
  * Description: The most complete popup plugin. Html, image, iframe, shortcode, video and many other popup types. Manage popup dimensions, effects, themes and more.
6
- * Version: 2.5.3
7
  * Author: Sygnoos
8
  * Author URI: http://www.sygnoos.com
9
  * License: GPLv2
3
  * Plugin Name: Popup Builder
4
  * Plugin URI: http://sygnoos.com
5
  * Description: The most complete popup plugin. Html, image, iframe, shortcode, video and many other popup types. Manage popup dimensions, effects, themes and more.
6
+ * Version: 2.5.5
7
  * Author: Sygnoos
8
  * Author URI: http://www.sygnoos.com
9
  * License: GPLv2
readme.txt CHANGED
@@ -159,16 +159,19 @@ Go to the Popup Builder settings and set your desired options.
159
 
160
  == Changelog ==
161
 
 
 
 
162
  = Version 2.5.3 =
163
  * Tweak: JS and CSS minified for better performance.
164
  * Tweak: Responsive mode calculations are more accurate.
165
  * Tweak: Facebook popup share and like buttons will be localized according to the site language.
166
  * Bug fixed connected to user roles who can use popup builder plugin.
167
- * Bug fixed connected to Max-Width option for Auto mode.
168
  * Code optimization and typo fixes.
169
 
170
  = Version 2.5.2 =
171
- * Added new option auto inside the responsive mode.
172
  * Tweak: popup loading optimization.
173
  * Tweak: added compatibility with autoptimize plugin.
174
  * Tweak: added e.preventDefault(); for onclick popups to not redirect the page.
@@ -474,7 +477,7 @@ This will open a popup before a user goes to the page from the link.
474
 
475
  **How to redirect users after clicking on the popup image?**
476
 
477
- Go to the Options section of your popup and find "Dismiss on content click" option.
478
  Then Select "Redirect" option and in the URL field type the URL of the page you need your users to be redirected to.
479
 
480
  **Can I show a popup after a specific amount of time?**
@@ -613,7 +616,7 @@ Leave us a good review :)
613
 
614
  == Upgrade Notice ==
615
 
616
- Current Version of Popup Builder is 2.5.3
617
 
618
  == Other Notes ==
619
 
159
 
160
  == Changelog ==
161
 
162
+ = Version 2.5.4 - 2.5.5 =
163
+ * Security update.
164
+
165
  = Version 2.5.3 =
166
  * Tweak: JS and CSS minified for better performance.
167
  * Tweak: Responsive mode calculations are more accurate.
168
  * Tweak: Facebook popup share and like buttons will be localized according to the site language.
169
  * Bug fixed connected to user roles who can use popup builder plugin.
170
+ * Bug fixed connected to Max-Width option for ‘Auto’ mode.
171
  * Code optimization and typo fixes.
172
 
173
  = Version 2.5.2 =
174
+ * Added new option `auto` inside the responsive mode.
175
  * Tweak: popup loading optimization.
176
  * Tweak: added compatibility with autoptimize plugin.
177
  * Tweak: added e.preventDefault(); for onclick popups to not redirect the page.
477
 
478
  **How to redirect users after clicking on the popup image?**
479
 
480
+ Go to the ‘Options’ section of your popup and find "Dismiss on content click" option.
481
  Then Select "Redirect" option and in the URL field type the URL of the page you need your users to be redirected to.
482
 
483
  **Can I show a popup after a specific amount of time?**
616
 
617
  == Upgrade Notice ==
618
 
619
+ Current Version of Popup Builder is 2.5.4
620
 
621
  == Other Notes ==
622