Popups, Welcome Bar, Optins and Lead Generation Plugin – Icegram - Version 1.10.29

Version Description

  • Fix: Fixed security issue in the gallery
Download this release

Release Info

Developer Icegram
Plugin Icon 128x128 Popups, Welcome Bar, Optins and Lead Generation Plugin – Icegram
Version 1.10.29
Comparing to
See all releases

Code changes from version 1.10.28.2 to 1.10.29

classes/feedback.php CHANGED
@@ -17,9 +17,19 @@ if ( ! function_exists( 'ig_get_additional_info' ) ) {
17
  * @since 1.5.17
18
  */
19
  function ig_get_additional_info( $additional_info, $system_info = false ) {
20
- global $icegram;
21
  $additional_info['version'] = $icegram->version;
 
22
 
 
 
 
 
 
 
 
 
 
23
  return $additional_info;
24
 
25
  }
17
  * @since 1.5.17
18
  */
19
  function ig_get_additional_info( $additional_info, $system_info = false ) {
20
+ global $icegram, $ig_tracker;
21
  $additional_info['version'] = $icegram->version;
22
+ if ( $system_info ) {
23
 
24
+ $additional_info['active_plugins'] = implode( ', ', $ig_tracker::get_active_plugins() );
25
+ $additional_info['inactive_plugins'] = implode( ', ', $ig_tracker::get_inactive_plugins() );
26
+ $additional_info['current_theme'] = $ig_tracker::get_current_theme_info();
27
+ $additional_info['wp_info'] = $ig_tracker::get_wp_info();
28
+ $additional_info['server_info'] = $ig_tracker::get_server_info();
29
+
30
+ // IG Specific information
31
+ $additional_info['plugin_meta_info'] = Icegram::get_ig_meta_info();
32
+ }
33
  return $additional_info;
34
 
35
  }
classes/feedback/assets/css/{emoji.css → emoji.min.css} RENAMED
File without changes
classes/feedback/assets/css/feedback.min.css ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .ig-es-feedback-button {
2
+ height: 40px;
3
+ border: solid 3px #CCCCCC;
4
+ background: #333;
5
+ width: 100px;
6
+ line-height: 32px;
7
+ -webkit-transform: rotate(-90deg);
8
+ font-weight: 600;
9
+ color: white;
10
+ transform: rotate(-90deg);
11
+ -ms-transform: rotate(-90deg);
12
+ -moz-transform: rotate(-90deg);
13
+ text-align: center;
14
+ font-size: 17px;
15
+ position: fixed;
16
+ right: -40px;
17
+ top: 45%;
18
+ font-family: "Roboto", helvetica, arial, sans-serif;
19
+ z-index: 999;
20
+ cursor: pointer;
21
+ }
22
+
23
+
24
+ .ig-powered-by {
25
+ font-size: 12px;
26
+ }
27
+
28
+ /* General Feedback Form */
29
+ .ig-general-feedback .ig-feedback-data-name {
30
+ width: 50%;
31
+ float: left;
32
+ }
33
+
34
+ .ig-general-feedback .ig-feedback-data-email {
35
+ width: 50%;
36
+ float: left;
37
+ }
38
+
39
+ .ig-general-feedback .ig-feedback-data-email input,
40
+ .ig-general-feedback .ig-feedback-data-name input,
41
+ .email-subscribers_page_es_settings .ig-general-feedback .ig-feedback-data-email input,
42
+ .email-subscribers_page_es_settings .ig-general-feedback .ig-feedback-data-name input {
43
+ width: 84%;
44
+ }
45
+
46
+ .ig-general-feedback label {
47
+ display: inline-block;
48
+ margin-bottom: 3px;
49
+ color: #484848;
50
+ }
51
+
52
+ #swal2-content {
53
+ text-align: left;
54
+ }
55
+
56
+ .email-subscribers_page_es_settings .ig-feedback-data-message textarea, .ig-feedback-data-message textarea {
57
+ height: 200px;
58
+ width: 92%
59
+ }
classes/feedback/assets/css/{star-rating.css → star-rating.min.css} RENAMED
File without changes
classes/feedback/assets/css/{sweetalert2.css → sweetalert2.min.css} RENAMED
@@ -1446,8 +1446,4 @@ body.swal2-no-backdrop .swal2-shown.swal2-bottom-end, body.swal2-no-backdrop .sw
1446
  body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container {
1447
  position: initial !important;
1448
  }
1449
- }
1450
-
1451
- .ig-powered-by {
1452
- font-size: 12px;
1453
  }
1446
  body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container {
1447
  position: initial !important;
1448
  }
 
 
 
 
1449
  }
classes/feedback/assets/js/{sweetalert2.js → sweetalert2.min.js} RENAMED
File without changes
classes/feedback/{class-ig-feedback-v-1-0-1.php → class-ig-feedback-v-1-0-5.php} RENAMED
@@ -5,16 +5,17 @@
5
  * The IG Feedback class adds functionality to get quick interactive feedback from users.
6
  * There are different types of feedabck widget like Stars, Emoji, Thubms Up/ Down, Number etc.
7
  *
8
- * @class IG_Feedback
9
  * @package feedback
10
  * @copyright Copyright (c) 2019, Icegram
11
  * @license https://opensource.org/licenses/gpl-license GNU Public License
 
12
  * @since 1.0.0
13
  */
14
 
15
  defined( 'ABSPATH' ) || exit;
16
 
17
- if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
18
  /**
19
  * Icegram Deactivation Survey.
20
  *
@@ -26,7 +27,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
26
  * @license GPL-2.0+
27
  * @copyright Copyright (c) 2019
28
  */
29
- class IG_Feedback_V_1_0_1 {
30
 
31
  /**
32
  * The API URL where we will send feedback data.
@@ -126,7 +127,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
126
  * @since 1.0.1
127
  */
128
  public function enqueue_scripts() {
129
- wp_enqueue_script( 'sweetalert', plugin_dir_url( __FILE__ ) . 'assets/js/sweetalert2.js', array( 'jquery' ) );
130
  }
131
 
132
  /**
@@ -135,20 +136,33 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
135
  * @since 1.0.1
136
  */
137
  public function enqueue_styles() {
138
- wp_register_style( 'sweetalert', plugin_dir_url( __FILE__ ) . 'assets/css/sweetalert2.css' );
139
  wp_enqueue_style( 'sweetalert' );
140
 
141
  wp_register_style( 'animate', plugin_dir_url( __FILE__ ) . 'assets/css/animate.min.css' );
142
  wp_enqueue_style( 'animate' );
143
 
144
- wp_register_style( 'ig-feedback-star-rating', plugin_dir_url( __FILE__ ) . 'assets/css/star-rating.css' );
145
  wp_enqueue_style( 'ig-feedback-star-rating' );
146
 
147
- wp_register_style( 'ig-feedback-emoji', plugin_dir_url( __FILE__ ) . 'assets/css/emoji.css' );
148
  wp_enqueue_style( 'ig-feedback-emoji' );
 
 
 
149
  }
150
 
151
- public function render_widget( $params = array() ) {
 
 
 
 
 
 
 
 
 
 
152
 
153
  $default_params = array(
154
  'event' => 'feedback',
@@ -159,12 +173,21 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
159
  'allowOutsideClick' => false,
160
  'allowEscapeKey' => true,
161
  'showCloseButton' => true,
162
- 'confirmButtonText' => __( 'Ok', 'email-subscribers' ),
163
- 'backdrop' => true
 
 
164
  );
165
 
166
  $params = wp_parse_args( $params, $default_params );
167
 
 
 
 
 
 
 
 
168
  $title = $params['title'];
169
  $slug = sanitize_title( $title );
170
  $event = $this->event_prefix . $params['event'];
@@ -201,77 +224,89 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
201
  return jQuery.post(ajaxurl, data);
202
  }
203
 
204
- Swal.mixin({
205
- footer: '<?php echo $this->footer; ?>',
206
- position: '<?php echo $params['position']; ?>',
207
- width: <?php echo $params['width']; ?>,
208
- animation: false,
209
- focusConfirm: false,
210
- allowEscapeKey: '<?php echo $params['allowEscapeKey']; ?>',
211
- showCloseButton: '<?php echo $params['showCloseButton']; ?>',
212
- allowOutsideClick: '<?php echo $params['allowOutsideClick']; ?>',
213
- showLoaderOnConfirm: true,
214
- confirmButtonText: '<?php echo $params['confirmButtonText']; ?>',
215
- backdrop: '<?php echo (int) $params['backdrop']; ?>'
216
- }).queue([
217
- {
218
- title: '<p class="ig-feedback-title"><?php echo esc_js( $params['title'] ); ?></p>',
219
- html: '<?php echo $html; ?>',
220
- customClass: {
221
- popup: 'animated fadeInUpBig'
222
- },
223
- onOpen: () => {
224
- var clicked = false;
225
- var selectedReaction = '';
226
- jQuery('.ig-emoji').hover(function () {
227
- reaction = jQuery(this).attr('data-reaction');
228
- jQuery('#emoji-info').text(reaction);
229
- }, function () {
230
- if (!clicked) {
231
- jQuery('#emoji-info').text('');
232
- } else {
233
- jQuery('#emoji-info').text(selectedReaction);
234
- }
235
- });
236
-
237
- jQuery('.ig-emoji').on('click', function () {
238
- clicked = true;
239
- jQuery('.ig-emoji').removeClass('active');
240
- jQuery(this).addClass('active');
241
- selectedReaction = jQuery(this).attr('data-reaction');
242
- jQuery('#emoji-info').text(reaction);
243
- });
244
- },
245
- preConfirm: () => {
246
 
247
- var rating = jQuery("input[name='rating']:checked").val();
248
- var details = '';
249
 
250
- if (rating === undefined) {
251
- Swal.showValidationMessage('Please give your input');
252
- return;
253
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
254
 
255
- return doSend(rating, details);
256
- }
257
- },
258
 
259
- ]).then(response => {
260
 
261
- if (response.hasOwnProperty('value')) {
 
 
 
 
 
 
 
 
262
 
263
- Swal.fire({
264
- type: 'success',
265
- width: <?php echo $params['width']; ?>,
266
- title: "Thank You!",
267
- showConfirmButton: false,
268
- position: '<?php echo $params['position']; ?>',
269
- timer: 1500,
270
- animation: false
271
  });
272
 
273
- }
274
- });
 
 
 
 
 
275
  </script>
276
  <?php
277
  }
@@ -340,6 +375,178 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
340
 
341
  }
342
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
343
  /**
344
  * Get Feedback API url
345
  *
@@ -369,7 +576,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
369
  return;
370
  }
371
 
372
- $title = 'Why are you deactivating Email Subscribers?';
373
  $slug = sanitize_title( $title );
374
  $event = $this->event_prefix . 'plugin.deactivation';
375
 
@@ -379,7 +586,33 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
379
  var $deactivateLink = $('#the-list').find('[data-slug="<?php echo $this->plugin; ?>"] span.deactivate a'),
380
  $overlay = $('#ig-deactivate-survey-<?php echo $this->plugin; ?>'),
381
  $form = $overlay.find('form'),
382
- formOpen = false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
383
  // Plugin listing table deactivate link.
384
  $deactivateLink.on('click', function (event) {
385
  event.preventDefault();
@@ -391,14 +624,30 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
391
  $form.on('change', 'input[type=radio]', function (event) {
392
  event.preventDefault();
393
  $form.find('input[type=text], .error').hide();
 
394
  $form.find('.ig-deactivate-survey-option').removeClass('selected');
395
  $(this).closest('.ig-deactivate-survey-option').addClass('selected').find('input[type=text]').show();
 
 
 
 
396
  });
397
  // Survey Skip & Deactivate.
398
  $form.on('click', '.ig-deactivate-survey-deactivate', function (event) {
399
  event.preventDefault();
400
  location.href = $deactivateLink.attr('href');
401
  });
 
 
 
 
 
 
 
 
 
 
 
402
  // Survey submit.
403
  $form.submit(function (event) {
404
  event.preventDefault();
@@ -407,6 +656,25 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
407
  return;
408
  }
409
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
410
  var data = {
411
  action: '<?php echo $this->ajax_action; ?>',
412
  feedback: {
@@ -424,7 +692,9 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
424
  plugin: '<?php echo $this->plugin; ?>',
425
  plugin_abbr: '<?php echo $this->plugin_abbr; ?>',
426
  is_dev_mode: '<?php echo $this->is_dev_mode; ?>',
427
- set_cookie: ''
 
 
428
  }
429
  };
430
 
@@ -501,6 +771,22 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
501
  margin: 0 0 18px 0;
502
  }
503
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
504
  .ig-deactivate-survey-title span {
505
  color: #999;
506
  margin-right: 10px;
@@ -552,6 +838,8 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
552
  return;
553
  }
554
 
 
 
555
  $options = array(
556
  1 => array(
557
  'title' => esc_html__( 'I no longer need the plugin', 'email-subscribers' ),
@@ -595,6 +883,13 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
595
  </div>
596
  <?php endforeach; ?>
597
  </div>
 
 
 
 
 
 
 
598
  <div class="ig-deactivate-survey-footer">
599
  <button type="submit" class="ig-deactivate-survey-submit button button-primary button-large"><?php echo sprintf( esc_html__( 'Submit %s Deactivate', 'email-subscribers' ), '&amp;' ); ?></button>
600
  <a href="#" class="ig-deactivate-survey-deactivate"><?php echo sprintf( esc_html__( 'Skip %s Deactivate', 'email-subscribers' ), '&amp;' ); ?></a>
@@ -663,6 +958,9 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
663
  }
664
  $url_parts = parse_url( $url );
665
  $host = ! empty( $url_parts['host'] ) ? $url_parts['host'] : false;
 
 
 
666
  if ( ! empty( $url ) && ! empty( $host ) ) {
667
  if ( false !== ip2long( $host ) ) {
668
  if ( ! filter_var( $host, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE ) ) {
@@ -790,21 +1088,23 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_1' ) ) {
790
  $plugin_abbr = ! empty( $data['misc']['plugin_abbr'] ) ? $data['misc']['plugin_abbr'] : 'ig_feedback';
791
  $is_dev_mode = ! empty( $data['misc']['is_dev_mode'] ) ? $data['misc']['is_dev_mode'] : false;
792
  $set_transient = ! empty( $data['misc']['set_transient'] ) ? $data['misc']['set_transient'] : false;
793
- $system_info = ! empty( $data['misc']['system_info'] ) ? $data['misc']['system_info'] : false;
 
794
 
795
  unset( $data['misc'] );
796
 
797
- $meta_info = array(
798
  'plugin' => sanitize_key( $plugin ),
799
  'locale' => get_locale(),
800
  'wp_version' => get_bloginfo( 'version' )
801
  );
802
 
 
 
803
  $additional_info = array();
804
  $additional_info = apply_filters( $plugin_abbr . '_additional_feedback_meta_info', $additional_info, $system_info ); // Get Additional meta information
805
-
806
  if ( is_array( $additional_info ) && count( $additional_info ) > 0 ) {
807
- $meta_info = $meta_info + $additional_info;
808
  }
809
 
810
  $data['meta'] = $meta_info;
5
  * The IG Feedback class adds functionality to get quick interactive feedback from users.
6
  * There are different types of feedabck widget like Stars, Emoji, Thubms Up/ Down, Number etc.
7
  *
8
+ * @class IG_Feedback_V_1_0_5
9
  * @package feedback
10
  * @copyright Copyright (c) 2019, Icegram
11
  * @license https://opensource.org/licenses/gpl-license GNU Public License
12
+ * @author Icegram
13
  * @since 1.0.0
14
  */
15
 
16
  defined( 'ABSPATH' ) || exit;
17
 
18
+ if ( ! class_exists( 'IG_Feedback_V_1_0_5' ) ) {
19
  /**
20
  * Icegram Deactivation Survey.
21
  *
27
  * @license GPL-2.0+
28
  * @copyright Copyright (c) 2019
29
  */
30
+ class IG_Feedback_V_1_0_5 {
31
 
32
  /**
33
  * The API URL where we will send feedback data.
127
  * @since 1.0.1
128
  */
129
  public function enqueue_scripts() {
130
+ wp_enqueue_script( 'sweetalert', plugin_dir_url( __FILE__ ) . 'assets/js/sweetalert2.min.js', array( 'jquery' ) );
131
  }
132
 
133
  /**
136
  * @since 1.0.1
137
  */
138
  public function enqueue_styles() {
139
+ wp_register_style( 'sweetalert', plugin_dir_url( __FILE__ ) . 'assets/css/sweetalert2.min.css' );
140
  wp_enqueue_style( 'sweetalert' );
141
 
142
  wp_register_style( 'animate', plugin_dir_url( __FILE__ ) . 'assets/css/animate.min.css' );
143
  wp_enqueue_style( 'animate' );
144
 
145
+ wp_register_style( 'ig-feedback-star-rating', plugin_dir_url( __FILE__ ) . 'assets/css/star-rating.min.css' );
146
  wp_enqueue_style( 'ig-feedback-star-rating' );
147
 
148
+ wp_register_style( 'ig-feedback-emoji', plugin_dir_url( __FILE__ ) . 'assets/css/emoji.min.css' );
149
  wp_enqueue_style( 'ig-feedback-emoji' );
150
+
151
+ wp_register_style( 'ig-feedback', plugin_dir_url( __FILE__ ) . 'assets/css/feedback.min.css' );
152
+ wp_enqueue_style( 'ig-feedback' );
153
  }
154
 
155
+ /**
156
+ * Prepare Widget Params
157
+ *
158
+ * @param array $params
159
+ *
160
+ * @return array
161
+ *
162
+ * @since 1.0.3
163
+ */
164
+
165
+ public function prepare_widget_params( $params = array() ) {
166
 
167
  $default_params = array(
168
  'event' => 'feedback',
173
  'allowOutsideClick' => false,
174
  'allowEscapeKey' => true,
175
  'showCloseButton' => true,
176
+ 'confirmButtonText' => 'Ok',
177
+ 'backdrop' => true,
178
+ 'delay' => 3, // In Seconds
179
+ 'consent_text' => 'You are agree to our terms and condition' // In Seconds
180
  );
181
 
182
  $params = wp_parse_args( $params, $default_params );
183
 
184
+ return $params;
185
+ }
186
+
187
+ public function render_widget( $params = array() ) {
188
+
189
+ $params = $this->prepare_widget_params( $params );
190
+
191
  $title = $params['title'];
192
  $slug = sanitize_title( $title );
193
  $event = $this->event_prefix . $params['event'];
224
  return jQuery.post(ajaxurl, data);
225
  }
226
 
227
+ function showWidget(delay) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
 
229
+ setTimeout(function () {
 
230
 
231
+ Swal.mixin({
232
+ footer: '<?php echo $this->footer; ?>',
233
+ position: '<?php echo $params['position']; ?>',
234
+ width: <?php echo $params['width']; ?>,
235
+ animation: false,
236
+ focusConfirm: false,
237
+ allowEscapeKey: '<?php echo $params['allowEscapeKey']; ?>',
238
+ showCloseButton: '<?php echo $params['showCloseButton']; ?>',
239
+ allowOutsideClick: '<?php echo $params['allowOutsideClick']; ?>',
240
+ showLoaderOnConfirm: true,
241
+ confirmButtonText: '<?php echo $params['confirmButtonText']; ?>',
242
+ backdrop: '<?php echo (int) $params['backdrop']; ?>'
243
+ }).queue([
244
+ {
245
+ title: '<p class="ig-feedback-title"><?php echo esc_js( $params['title'] ); ?></p>',
246
+ html: '<?php echo $html; ?>',
247
+ customClass: {
248
+ popup: 'animated fadeInUpBig'
249
+ },
250
+ onOpen: () => {
251
+ var clicked = false;
252
+ var selectedReaction = '';
253
+ jQuery('.ig-emoji').hover(function () {
254
+ reaction = jQuery(this).attr('data-reaction');
255
+ jQuery('#emoji-info').text(reaction);
256
+ }, function () {
257
+ if (!clicked) {
258
+ jQuery('#emoji-info').text('');
259
+ } else {
260
+ jQuery('#emoji-info').text(selectedReaction);
261
+ }
262
+ });
263
+
264
+ jQuery('.ig-emoji').on('click', function () {
265
+ clicked = true;
266
+ jQuery('.ig-emoji').removeClass('active');
267
+ jQuery(this).addClass('active');
268
+ selectedReaction = jQuery(this).attr('data-reaction');
269
+ jQuery('#emoji-info').text(reaction);
270
+ });
271
+ },
272
+ preConfirm: () => {
273
+
274
+ var rating = jQuery("input[name='rating']:checked").val();
275
+ var details = '';
276
+
277
+ if (rating === undefined) {
278
+ Swal.showValidationMessage('Please give your input');
279
+ return;
280
+ }
281
+
282
+ return doSend(rating, details);
283
+ }
284
+ },
285
 
286
+ ]).then(response => {
 
 
287
 
288
+ if (response.hasOwnProperty('value')) {
289
 
290
+ Swal.fire({
291
+ type: 'success',
292
+ width: <?php echo $params['width']; ?>,
293
+ title: "Thank You!",
294
+ showConfirmButton: false,
295
+ position: '<?php echo $params['position']; ?>',
296
+ timer: 1500,
297
+ animation: false
298
+ });
299
 
300
+ }
 
 
 
 
 
 
 
301
  });
302
 
303
+ }, delay * 1000);
304
+ }
305
+
306
+ var delay = <?php echo $params['delay']; ?>;
307
+ showWidget(delay);
308
+
309
+
310
  </script>
311
  <?php
312
  }
375
 
376
  }
377
 
378
+ /**
379
+ * Render General Feedback Sidebar Button Widget
380
+ *
381
+ * @since 1.0.3
382
+ */
383
+ public function render_general_feedback( $params = array() ) {
384
+
385
+ $params = $this->prepare_widget_params( $params );
386
+
387
+ ob_start();
388
+
389
+ ?>
390
+
391
+ <form class="ig-general-feedback" id="ig-general-feedback">
392
+ <p class="ig-feedback-data-name">
393
+ <label class="ig-label">Name</label><br/>
394
+ <input type="text" name="feedback_data[name]" id="ig-feedback-data-name" value="<?php echo $params['name']; ?>"/>
395
+ </p>
396
+ <p class="ig-feedback-data-email">
397
+ <label class="ig-label"">Email</label><br/>
398
+ <input type="email" name="feedback_data[email]" id="ig-feedback-data-email" value="<?php echo $params['email']; ?>"/>
399
+ </p>
400
+ <p class="ig-feedback-data-message">
401
+ <label class="ig-label"">Feedback</label><br/>
402
+ <textarea name="feedback_data[details]" id="ig-feedback-data-message"></textarea>
403
+ </p>
404
+ <p>
405
+ <input type="checkbox" name="feedback_data[collect_system_info]" checked="checked" id="ig-feedback-data-consent"/><?php echo $params['consent_text']; ?>
406
+ </p>
407
+ </form>
408
+
409
+ <?php
410
+
411
+ $html = str_replace( array( "\r", "\n" ), '', trim( ob_get_clean() ) );
412
+
413
+ $params['html'] = $html;
414
+
415
+ $title = $params['title'];
416
+ $slug = sanitize_title( $title );
417
+ $event = $this->event_prefix . $params['event'];
418
+ $html = ! empty( $params['html'] ) ? $params['html'] : '';
419
+
420
+ ob_start();
421
+ ?>
422
+
423
+ <script type="text/javascript">
424
+
425
+ jQuery(document).ready(function ($) {
426
+
427
+ function doSend(details, meta, system_info) {
428
+
429
+ var data = {
430
+ action: '<?php echo $this->ajax_action; ?>',
431
+ feedback: {
432
+ type: '<?php echo $params['type']; ?>',
433
+ slug: '<?php echo $slug; ?>',
434
+ title: '<?php echo esc_js( $title ); ?>',
435
+ details: details
436
+ },
437
+
438
+ event: '<?php echo $event; ?>',
439
+
440
+ // Add additional information
441
+ misc: {
442
+ plugin: '<?php echo $this->plugin; ?>',
443
+ plugin_abbr: '<?php echo $this->plugin_abbr; ?>',
444
+ is_dev_mode: '<?php echo $this->is_dev_mode; ?>',
445
+ set_transient: '<?php echo $params['set_transient']; ?>',
446
+ meta_info: meta,
447
+ system_info: system_info
448
+ }
449
+ };
450
+
451
+ return jQuery.post(ajaxurl, data);
452
+ }
453
+
454
+ function validateEmail(email) {
455
+ var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
456
+ if (!emailReg.test(email)) {
457
+ return false;
458
+ } else {
459
+ return true;
460
+ }
461
+ }
462
+
463
+ $('#wpwrap').append('<div class="ig-es-feedback-button">Feedback</div>');
464
+
465
+ $('.ig-es-feedback-button').on('click', function () {
466
+
467
+ Swal.mixin({
468
+ footer: '<?php echo $this->footer; ?>',
469
+ position: '<?php echo $params['position']; ?>',
470
+ width: <?php echo $params['width']; ?>,
471
+ animation: false,
472
+ focusConfirm: false,
473
+ allowEscapeKey: true,
474
+ showCloseButton: '<?php echo $params['showCloseButton']; ?>',
475
+ allowOutsideClick: '<?php echo $params['allowOutsideClick']; ?>',
476
+ showLoaderOnConfirm: true,
477
+ confirmButtonText: '<?php echo $params['confirmButtonText']; ?>',
478
+ backdrop: '<?php echo (int) $params['backdrop']; ?>'
479
+ }).queue([
480
+ {
481
+ title: '<p class="ig-feedback-title"><?php echo esc_js( $params['title'] ); ?></p>',
482
+ html: '<?php echo $html; ?>',
483
+ customClass: {
484
+ popup: 'animated fadeInUpBig'
485
+ },
486
+ onOpen: () => {
487
+
488
+
489
+ },
490
+ preConfirm: () => {
491
+
492
+ var email = $('#ig-feedback-data-email').val();
493
+ var name = $('#ig-feedback-data-name').val();
494
+ var message = $('#ig-feedback-data-message').val();
495
+ var consent = $('#ig-feedback-data-consent').attr('checked');
496
+
497
+
498
+ if (email !== '' && !validateEmail(email)) {
499
+ Swal.showValidationMessage('Please enter valid email');
500
+ return;
501
+ }
502
+
503
+ if (message === '') {
504
+ Swal.showValidationMessage('Please enter your message');
505
+ return;
506
+ }
507
+
508
+ var system_info = false;
509
+ if (consent === 'checked') {
510
+ system_info = true;
511
+ }
512
+
513
+ var meta = {
514
+ name: name,
515
+ email: email
516
+ };
517
+
518
+ return doSend(message, meta, system_info);
519
+ }
520
+ },
521
+
522
+ ]).then(response => {
523
+
524
+ if (response.hasOwnProperty('value')) {
525
+
526
+ Swal.fire({
527
+ type: 'success',
528
+ width: <?php echo $params['width']; ?>,
529
+ title: "Thank You!",
530
+ showConfirmButton: false,
531
+ position: '<?php echo $params['position']; ?>',
532
+ timer: 1500,
533
+ animation: false
534
+ });
535
+
536
+ }
537
+ });
538
+
539
+
540
+ });
541
+ });
542
+
543
+ </script>
544
+
545
+
546
+ <?php
547
+
548
+ }
549
+
550
  /**
551
  * Get Feedback API url
552
  *
576
  return;
577
  }
578
 
579
+ $title = 'Why are you deactivating ' . $this->name . '?';
580
  $slug = sanitize_title( $title );
581
  $event = $this->event_prefix . 'plugin.deactivation';
582
 
586
  var $deactivateLink = $('#the-list').find('[data-slug="<?php echo $this->plugin; ?>"] span.deactivate a'),
587
  $overlay = $('#ig-deactivate-survey-<?php echo $this->plugin; ?>'),
588
  $form = $overlay.find('form'),
589
+ formOpen = false,
590
+ consent = $('#ig-deactivate-survey-help-consent-<?php echo $this->plugin; ?>');
591
+
592
+ function togglePersonalInfoFields ( show ) {
593
+
594
+ if(show) {
595
+ $form.find('#ig-deactivate-survey-info-name').show();
596
+ $form.find('#ig-deactivate-survey-info-email-address').show();
597
+ $form.find('#ig-deactivate-survey-consent-additional-data').show();
598
+ } else {
599
+ $form.find('#ig-deactivate-survey-info-name').hide();
600
+ $form.find('#ig-deactivate-survey-info-email-address').hide();
601
+ $form.find('#ig-deactivate-survey-consent-additional-data').hide();
602
+ }
603
+
604
+ };
605
+
606
+
607
+ function validateEmail(email) {
608
+ var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
609
+ if (!emailReg.test(email)) {
610
+ return false;
611
+ } else {
612
+ return true;
613
+ }
614
+ };
615
+
616
  // Plugin listing table deactivate link.
617
  $deactivateLink.on('click', function (event) {
618
  event.preventDefault();
624
  $form.on('change', 'input[type=radio]', function (event) {
625
  event.preventDefault();
626
  $form.find('input[type=text], .error').hide();
627
+
628
  $form.find('.ig-deactivate-survey-option').removeClass('selected');
629
  $(this).closest('.ig-deactivate-survey-option').addClass('selected').find('input[type=text]').show();
630
+
631
+ if(consent.attr('checked') === 'checked') {
632
+ togglePersonalInfoFields(true);
633
+ }
634
  });
635
  // Survey Skip & Deactivate.
636
  $form.on('click', '.ig-deactivate-survey-deactivate', function (event) {
637
  event.preventDefault();
638
  location.href = $deactivateLink.attr('href');
639
  });
640
+
641
+ // Help Consent
642
+ togglePersonalInfoFields(false);
643
+ consent.on('click', function () {
644
+ if(consent.attr('checked') === 'checked') {
645
+ togglePersonalInfoFields(true);
646
+ } else {
647
+ togglePersonalInfoFields(false);
648
+ }
649
+ });
650
+
651
  // Survey submit.
652
  $form.submit(function (event) {
653
  event.preventDefault();
656
  return;
657
  }
658
 
659
+ var system_info = false;
660
+ var name = '';
661
+ var email = '';
662
+
663
+ if(consent.attr('checked') === 'checked') {
664
+ name = $('#ig-deactivate-survey-info-name').val();
665
+ email = $('#ig-deactivate-survey-info-email-address').val();
666
+ if(email === '' || !validateEmail(email)) {
667
+ alert('Please enter valid email');
668
+ return;
669
+ }
670
+ system_info = true;
671
+ }
672
+
673
+ var meta = {
674
+ name: name,
675
+ email: email
676
+ };
677
+
678
  var data = {
679
  action: '<?php echo $this->ajax_action; ?>',
680
  feedback: {
692
  plugin: '<?php echo $this->plugin; ?>',
693
  plugin_abbr: '<?php echo $this->plugin_abbr; ?>',
694
  is_dev_mode: '<?php echo $this->is_dev_mode; ?>',
695
+ set_cookie: '',
696
+ meta_info: meta,
697
+ system_info: system_info
698
  }
699
  };
700
 
771
  margin: 0 0 18px 0;
772
  }
773
 
774
+ .ig-deactivate-survey-options {
775
+ border-bottom: 1px solid #ddd;
776
+ padding: 0 0 18px 0;
777
+ margin: 0 0 18px 0;
778
+ }
779
+
780
+ .ig-deactivate-survey-info-data {
781
+ padding: 0 0 18px 0;
782
+ margin: 10px 10px 10px 30px;
783
+ }
784
+
785
+ .ig-deactivate-survey-info-name, .ig-deactivate-survey-info-email-address {
786
+ width: 230px;
787
+ margin: 10px;
788
+ }
789
+
790
  .ig-deactivate-survey-title span {
791
  color: #999;
792
  margin-right: 10px;
838
  return;
839
  }
840
 
841
+ $email = get_option('admin_email');
842
+
843
  $options = array(
844
  1 => array(
845
  'title' => esc_html__( 'I no longer need the plugin', 'email-subscribers' ),
883
  </div>
884
  <?php endforeach; ?>
885
  </div>
886
+ <div class="ig-deactivate-survey-help-consent">
887
+ <input id="ig-deactivate-survey-help-consent-<?php echo $this->plugin; ?>" class="ig-deactivate-survey-option-input" type="checkbox" name="code" data-option-slug="<?php echo $option['slug']; ?>"/><b>Yes, I give my consent to track plugin usage and contact me back to make this plugin works!</b>
888
+ </div>
889
+ <div class="ig-deactivate-survey-info-data">
890
+ <input type="text" class="ig-deactivate-survey-info-name" id="ig-deactivate-survey-info-name" placeholder="Enter Name" name="ig-deactivate-survey-info-name" value="" />
891
+ <input type="text" class="ig-deactivate-survey-info-email-address" id="ig-deactivate-survey-info-email-address" name="ig-deactivate-survey-info-email-address" value="<?php echo $email; ?>" />
892
+ </div>
893
  <div class="ig-deactivate-survey-footer">
894
  <button type="submit" class="ig-deactivate-survey-submit button button-primary button-large"><?php echo sprintf( esc_html__( 'Submit %s Deactivate', 'email-subscribers' ), '&amp;' ); ?></button>
895
  <a href="#" class="ig-deactivate-survey-deactivate"><?php echo sprintf( esc_html__( 'Skip %s Deactivate', 'email-subscribers' ), '&amp;' ); ?></a>
958
  }
959
  $url_parts = parse_url( $url );
960
  $host = ! empty( $url_parts['host'] ) ? $url_parts['host'] : false;
961
+ if( $host === '192.168.0.112' ){
962
+ return false;
963
+ }
964
  if ( ! empty( $url ) && ! empty( $host ) ) {
965
  if ( false !== ip2long( $host ) ) {
966
  if ( ! filter_var( $host, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE ) ) {
1088
  $plugin_abbr = ! empty( $data['misc']['plugin_abbr'] ) ? $data['misc']['plugin_abbr'] : 'ig_feedback';
1089
  $is_dev_mode = ! empty( $data['misc']['is_dev_mode'] ) ? $data['misc']['is_dev_mode'] : false;
1090
  $set_transient = ! empty( $data['misc']['set_transient'] ) ? $data['misc']['set_transient'] : false;
1091
+ $system_info = ( isset( $data['misc']['system_info'] ) && $data['misc']['system_info'] === 'true' ) ? true : false;
1092
+ $meta_info = ! empty( $data['misc']['meta_info'] ) ? $data['misc']['meta_info'] : array();
1093
 
1094
  unset( $data['misc'] );
1095
 
1096
+ $default_meta_info = array(
1097
  'plugin' => sanitize_key( $plugin ),
1098
  'locale' => get_locale(),
1099
  'wp_version' => get_bloginfo( 'version' )
1100
  );
1101
 
1102
+ $meta_info = wp_parse_args( $meta_info, $default_meta_info );
1103
+
1104
  $additional_info = array();
1105
  $additional_info = apply_filters( $plugin_abbr . '_additional_feedback_meta_info', $additional_info, $system_info ); // Get Additional meta information
 
1106
  if ( is_array( $additional_info ) && count( $additional_info ) > 0 ) {
1107
+ $meta_info = array_merge( $meta_info, $additional_info );
1108
  }
1109
 
1110
  $data['meta'] = $meta_info;
classes/feedback/{class-ig-tracker-v-1-0-1.php → class-ig-tracker-v-1-0-5.php} RENAMED
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
4
  exit; // Exit if accessed directly.
5
  }
6
 
7
- if ( ! class_exists( 'IG_Tracker_V_1_0_1' ) ) {
8
 
9
  /**
10
  * Icegram tracker.
@@ -14,7 +14,7 @@ if ( ! class_exists( 'IG_Tracker_V_1_0_1' ) ) {
14
  *
15
  * @since 1.0.0
16
  */
17
- class IG_Tracker_V_1_0_1 {
18
 
19
  /**
20
  * Get Active, Inactive or all plugins info
@@ -30,9 +30,11 @@ if ( ! class_exists( 'IG_Tracker_V_1_0_1' ) ) {
30
  'inactive_plugins' => array()
31
  );
32
 
33
- if ( ! function_exists( 'get_plugins' ) ) {
34
- require_once ABSPATH . 'wp-admin/includes/plugin.php';
35
- }
 
 
36
 
37
  $all_plugins = get_plugins();
38
  $active_plugins = get_option( 'active_plugins', array() );
@@ -42,7 +44,6 @@ if ( ! class_exists( 'IG_Tracker_V_1_0_1' ) ) {
42
  $active_plugins = ! empty( $active_plugins ) ? array_merge( $sitewide_activated_plugins, $active_plugins ) : $sitewide_activated_plugins;
43
  }
44
 
45
- $i = 0;
46
  foreach ( $all_plugins as $plugin_path => $plugin ) {
47
  // If the plugin isn't active, don't show it.
48
  if ( in_array( $plugin_path, $active_plugins ) ) {
@@ -71,8 +72,8 @@ if ( ! class_exists( 'IG_Tracker_V_1_0_1' ) ) {
71
  return $plugins['active_plugins'];
72
  } elseif ( 'inactive' === $status ) {
73
  return $plugins['inactive_plugins'];
74
- } elseif('all' === $status) {
75
- return array_merge($plugins['active_plugins'], $plugins['inactive_plugins']);
76
  }
77
  }
78
 
@@ -192,4 +193,4 @@ if ( ! class_exists( 'IG_Tracker_V_1_0_1' ) ) {
192
  return $wp_info;
193
  }
194
  }
195
- }
4
  exit; // Exit if accessed directly.
5
  }
6
 
7
+ if ( ! class_exists( 'IG_Tracker_V_1_0_5' ) ) {
8
 
9
  /**
10
  * Icegram tracker.
14
  *
15
  * @since 1.0.0
16
  */
17
+ class IG_Tracker_V_1_0_5 {
18
 
19
  /**
20
  * Get Active, Inactive or all plugins info
30
  'inactive_plugins' => array()
31
  );
32
 
33
+ // Check if get_plugins() function exists. This is required on the front end of the
34
+ // site, since it is in a file that is normally only loaded in the admin.
35
+ if ( ! function_exists( 'get_plugins' ) ) {
36
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
37
+ }
38
 
39
  $all_plugins = get_plugins();
40
  $active_plugins = get_option( 'active_plugins', array() );
44
  $active_plugins = ! empty( $active_plugins ) ? array_merge( $sitewide_activated_plugins, $active_plugins ) : $sitewide_activated_plugins;
45
  }
46
 
 
47
  foreach ( $all_plugins as $plugin_path => $plugin ) {
48
  // If the plugin isn't active, don't show it.
49
  if ( in_array( $plugin_path, $active_plugins ) ) {
72
  return $plugins['active_plugins'];
73
  } elseif ( 'inactive' === $status ) {
74
  return $plugins['inactive_plugins'];
75
+ } else {
76
+ return array_merge( $plugins['active_plugins'], $plugins['inactive_plugins'] );
77
  }
78
  }
79
 
193
  return $wp_info;
194
  }
195
  }
196
+ }
classes/ig-upsale-admin.php CHANGED
@@ -39,7 +39,7 @@ if ( !class_exists( 'Icegram_upsale' ) ) {
39
  function display_cta_upsale( $params ){
40
  global $icegram;
41
  ?>
42
- <a class="ig_cta_upsale" href="https://www.icegram.com/cta-actions/?utm_source=in_app&utm_medium==cta&utm_campaign=ig_upsale" target="blank"><img src="<?php echo $icegram->plugin_url ?>/assets/images/cta-new-tab.png"/></a>
43
  <?php
44
  return $params;
45
  }
39
  function display_cta_upsale( $params ){
40
  global $icegram;
41
  ?>
42
+ <a class="ig_cta_upsale" href="https://www.icegram.com/cta-actions/?utm_source=in_app&utm_medium=cta&utm_campaign=ig_upsale" target="blank"><img src="<?php echo $icegram->plugin_url ?>/assets/images/cta-new-tab.png"/></a>
43
  <?php
44
  return $params;
45
  }
icegram.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Icegram - Popups, Optins, CTAs & lot more...
4
  * Plugin URI: https://www.icegram.com/
5
  * Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
6
- * Version: 1.10.28.2
7
  * Author: icegram
8
  * Author URI: https://www.icegram.com/
9
  * Copyright (c) 2014-16 Icegram
@@ -33,9 +33,10 @@ class Icegram {
33
  public static $current_page_id;
34
 
35
  function __construct() {
36
- global $ig_feedback;
 
37
 
38
- $this->version = "1.10.28.2";
39
  $this->shortcode_instances = array();
40
  $this->mode = 'local';
41
  $this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
@@ -44,7 +45,9 @@ class Icegram {
44
  $this->cache_compatibility = get_option('icegram_cache_compatibility', 'no');
45
 
46
  if( is_admin() ){
47
- $ig_feedback = new IG_Feedback_V_1_0_1( 'Icegram', 'icegram', 'ig', 'igfree.', false );
 
 
48
  $ig_feedback->render_deactivate_feedback();
49
  }
50
 
@@ -93,7 +96,6 @@ class Icegram {
93
  add_filter( 'rainmaker_validate_request', array(&$this,'form_submission_validate_request'), 10, 2);
94
  add_filter( 'icegram_data', array( $this, 'two_step_mobile_popup' ), 100, 1);
95
 
96
- add_action ( 'wp_ajax_ig_submit_survey', array(&$this,'ig_submit_survey' ));
97
 
98
  if ( defined( 'DOING_AJAX' ) ) {
99
  if($this->cache_compatibility === 'yes'){
@@ -527,6 +529,7 @@ class Icegram {
527
  update_option( 'ig_last_gallery_items', $ig_gallery_json );
528
  }
529
  }else{
 
530
  ?>
531
  <script type="text/javascript">
532
  jQuery(document).ready(function(){
@@ -544,6 +547,7 @@ class Icegram {
544
  data: {
545
  action: 'save_gallery_data',
546
  galleryitems: JSON.stringify(response),
 
547
  },
548
  success: function( res ) {
549
  if ( res != undefined && res != '' && res.success != undefined && res.success == 'yes' ) {
@@ -602,6 +606,7 @@ class Icegram {
602
  data: {
603
  action: 'save_gallery_data',
604
  categories: response,
 
605
  },
606
  success: function( res ) {
607
  if ( res != undefined && res != '' && res.success != undefined && res.success == 'yes' ) {
@@ -625,25 +630,27 @@ class Icegram {
625
  }
626
 
627
  public function save_gallery_data(){
628
- if(!empty($_REQUEST) && !empty($_REQUEST['galleryitems'])){
629
- $ig_gallery_json = stripslashes($_REQUEST['galleryitems']);
630
- update_option( 'ig_last_gallery_items', $ig_gallery_json );
631
- }
632
- if(!empty($_REQUEST) && !empty($_REQUEST['categories'])){
633
- $categories = $_REQUEST['categories'];
634
- $cat_list = array();
635
- foreach ($categories as $category) {
636
- if($category['parent'] == 0 ){
637
- $cat_list[$category['term_id']]['name'] = $category['name'] ;
638
- $cat_list[$category['term_id']]['slug'] = $category['slug'] ;
639
- }else{
640
- $cat_list[$category['parent']]['list'][] = $category;
641
- }
 
 
 
 
642
  }
643
- update_option( 'ig_cat_list', $cat_list );
644
  }
645
 
646
-
647
  }
648
 
649
  public static function gallery_screen() {
@@ -1239,21 +1246,26 @@ class Icegram {
1239
 
1240
  // Include all classes required for Icegram plugin
1241
  function include_classes() {
1242
-
1243
- require_once('classes/feedback/class-ig-tracker-v-1-0-1.php');
1244
- require_once('classes/feedback/class-ig-feedback-v-1-0-1.php');
 
 
 
1245
  require_once('classes/feedback.php');
1246
 
1247
  $classes = glob( $this->plugin_path . '/classes/*.php' );
1248
  foreach ( $classes as $file ) {
1249
  // Files with 'admin' in their name are included only for admin section
1250
- if ( is_file( $file ) && ( (strpos($file, '-admin') >= 0 && is_admin()) || (strpos($file, '-admin') === false) ) ) {
1251
- $all_active_plugins = IG_Tracker_V_1_0_1::get_active_plugins();
1252
  if( (strpos($file, 'ig-upsale-admin.php') !== false ) && in_array('icegram-engage/icegram-engage.php', $all_active_plugins)){
1253
  continue;
1254
  }
1255
  include_once $file;
1256
- }
 
 
1257
  }
1258
 
1259
  // Load built in message types
@@ -1372,7 +1384,8 @@ class Icegram {
1372
  'post_content' => ( !empty( $campaign['post_content'] ) ) ? esc_attr( $campaign['post_content'] ) : '',
1373
  'post_name' => ( !empty( $campaign['post_title'] ) ) ? sanitize_title( $campaign['post_title'] ) : '',
1374
  'post_title' => ( !empty( $campaign['post_title'] ) ) ? $campaign['post_title'] : '',
1375
- 'post_status' => ( !empty( $campaign['post_status'] ) ) ? $campaign['post_status'] : 'draft',
 
1376
  'post_type' => 'ig_campaign'
1377
  );
1378
 
@@ -1465,9 +1478,9 @@ class Icegram {
1465
 
1466
  function import_gallery_item(){
1467
  if(!empty($_REQUEST['action']) && $_REQUEST['action'] == 'fetch_messages' && !empty($_REQUEST['campaign_id']) && !empty($_REQUEST['gallery_item'])){
 
1468
  $params = $_REQUEST;
1469
  $imported_gallery_items = array();
1470
- $url = 'https://www.icegram.com/gallery/wp-admin/admin-ajax.php?utm_source=ig_inapp&utm_campaign=ig_gallery&utm_medium='.$_REQUEST['campaign_id'];
1471
  $options = array(
1472
  'timeout' => 15,
1473
  'method' => 'POST',
@@ -1653,6 +1666,7 @@ class Icegram {
1653
  }
1654
  return self::$current_page_id;
1655
  }
 
1656
  static function get_current_page_url() {
1657
  if(!empty($_REQUEST['cache_compatibility']) && $_REQUEST['cache_compatibility'] == 'yes'){
1658
  $pageURL = (!empty($_REQUEST['referral_url'])) ? $_REQUEST['referral_url'] : '';
@@ -1847,6 +1861,19 @@ class Icegram {
1847
  return $request_data;
1848
  }
1849
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1850
  }
1851
 
1852
 
3
  * Plugin Name: Icegram - Popups, Optins, CTAs & lot more...
4
  * Plugin URI: https://www.icegram.com/
5
  * Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
6
+ * Version: 1.10.29
7
  * Author: icegram
8
  * Author URI: https://www.icegram.com/
9
  * Copyright (c) 2014-16 Icegram
33
  public static $current_page_id;
34
 
35
  function __construct() {
36
+ global $ig_feedback, $ig_tracker;
37
+ $feedback_version = '1.0.5';
38
 
39
+ $this->version = "1.10.29";
40
  $this->shortcode_instances = array();
41
  $this->mode = 'local';
42
  $this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
45
  $this->cache_compatibility = get_option('icegram_cache_compatibility', 'no');
46
 
47
  if( is_admin() ){
48
+ $ig_tracker = 'IG_Tracker_V_' . str_replace('.', '_', $feedback_version);
49
+ $ig_feedback_class = 'IG_Feedback_V_' . str_replace('.', '_', $feedback_version);
50
+ $ig_feedback = new $ig_feedback_class( 'Icegram', 'icegram', 'ig', 'igfree.', false );
51
  $ig_feedback->render_deactivate_feedback();
52
  }
53
 
96
  add_filter( 'rainmaker_validate_request', array(&$this,'form_submission_validate_request'), 10, 2);
97
  add_filter( 'icegram_data', array( $this, 'two_step_mobile_popup' ), 100, 1);
98
 
 
99
 
100
  if ( defined( 'DOING_AJAX' ) ) {
101
  if($this->cache_compatibility === 'yes'){
529
  update_option( 'ig_last_gallery_items', $ig_gallery_json );
530
  }
531
  }else{
532
+ update_option( 'requested_gallery_item_with_ajax', 'yes');
533
  ?>
534
  <script type="text/javascript">
535
  jQuery(document).ready(function(){
547
  data: {
548
  action: 'save_gallery_data',
549
  galleryitems: JSON.stringify(response),
550
+ security: '<?php echo wp_create_nonce( 'gallery-save-data' ); // WPCS: XSS ok. ?>'
551
  },
552
  success: function( res ) {
553
  if ( res != undefined && res != '' && res.success != undefined && res.success == 'yes' ) {
606
  data: {
607
  action: 'save_gallery_data',
608
  categories: response,
609
+ security: '<?php echo wp_create_nonce( 'gallery-save-data' ); // WPCS: XSS ok. ?>'
610
  },
611
  success: function( res ) {
612
  if ( res != undefined && res != '' && res.success != undefined && res.success == 'yes' ) {
630
  }
631
 
632
  public function save_gallery_data(){
633
+ check_ajax_referer( 'gallery-save-data', 'security' );
634
+ if ( current_user_can( 'manage_options' ) ) {
635
+ if(!empty($_REQUEST) && !empty($_REQUEST['galleryitems'])){
636
+ $ig_gallery_json = stripslashes($_REQUEST['galleryitems']);
637
+ update_option( 'ig_last_gallery_items', $ig_gallery_json );
638
+ }
639
+ if(!empty($_REQUEST) && !empty($_REQUEST['categories'])){
640
+ $categories = $_REQUEST['categories'];
641
+ $cat_list = array();
642
+ foreach ($categories as $category) {
643
+ if($category['parent'] == 0 ){
644
+ $cat_list[$category['term_id']]['name'] = $category['name'] ;
645
+ $cat_list[$category['term_id']]['slug'] = $category['slug'] ;
646
+ }else{
647
+ $cat_list[$category['parent']]['list'][] = $category;
648
+ }
649
+ }
650
+ update_option( 'ig_cat_list', $cat_list );
651
  }
 
652
  }
653
 
 
654
  }
655
 
656
  public static function gallery_screen() {
1246
 
1247
  // Include all classes required for Icegram plugin
1248
  function include_classes() {
1249
+ $feedback_version = '1.0.5';
1250
+ $feedback_version_for_file = str_replace('.', '-', $feedback_version);
1251
+ $t = 'classes/feedback/class-ig-tracker-v-' . $feedback_version_for_file . '.php';
1252
+ $f = 'classes/feedback/class-ig-feedback-v-' . $feedback_version_for_file . '.php';
1253
+ require_once($t);
1254
+ require_once($f);
1255
  require_once('classes/feedback.php');
1256
 
1257
  $classes = glob( $this->plugin_path . '/classes/*.php' );
1258
  foreach ( $classes as $file ) {
1259
  // Files with 'admin' in their name are included only for admin section
1260
+ if ( is_file( $file ) && ( (strpos($file, '-admin') >= 0 && is_admin()) ) ){
1261
+ $all_active_plugins = IG_Tracker_V_1_0_5::get_plugins();
1262
  if( (strpos($file, 'ig-upsale-admin.php') !== false ) && in_array('icegram-engage/icegram-engage.php', $all_active_plugins)){
1263
  continue;
1264
  }
1265
  include_once $file;
1266
+ } else if( !is_admin()){
1267
+ include_once $file;
1268
+ }
1269
  }
1270
 
1271
  // Load built in message types
1384
  'post_content' => ( !empty( $campaign['post_content'] ) ) ? esc_attr( $campaign['post_content'] ) : '',
1385
  'post_name' => ( !empty( $campaign['post_title'] ) ) ? sanitize_title( $campaign['post_title'] ) : '',
1386
  'post_title' => ( !empty( $campaign['post_title'] ) ) ? $campaign['post_title'] : '',
1387
+ // 'post_status' => ( !empty( $campaign['post_status'] ) ) ? $campaign['post_status'] : 'draft',
1388
+ 'post_status' => 'draft',
1389
  'post_type' => 'ig_campaign'
1390
  );
1391
 
1478
 
1479
  function import_gallery_item(){
1480
  if(!empty($_REQUEST['action']) && $_REQUEST['action'] == 'fetch_messages' && !empty($_REQUEST['campaign_id']) && !empty($_REQUEST['gallery_item'])){
1481
+ $url = 'https://www.icegram.com/gallery/wp-admin/admin-ajax.php?utm_source=ig_inapp&utm_campaign=ig_gallery&utm_medium='.$_REQUEST['campaign_id'];
1482
  $params = $_REQUEST;
1483
  $imported_gallery_items = array();
 
1484
  $options = array(
1485
  'timeout' => 15,
1486
  'method' => 'POST',
1666
  }
1667
  return self::$current_page_id;
1668
  }
1669
+
1670
  static function get_current_page_url() {
1671
  if(!empty($_REQUEST['cache_compatibility']) && $_REQUEST['cache_compatibility'] == 'yes'){
1672
  $pageURL = (!empty($_REQUEST['referral_url'])) ? $_REQUEST['referral_url'] : '';
1861
  return $request_data;
1862
  }
1863
 
1864
+ public static function get_ig_meta_info(){
1865
+ $total_campaigns = wp_count_posts('ig_campaign');
1866
+ $total_campaigns_publish = $total_campaigns->publish;
1867
+ $total_campaigns_draft = $total_campaigns->draft;
1868
+
1869
+ $meta_info = array(
1870
+ 'total_campaigns_publish' => $total_campaigns_publish,
1871
+ 'total_campaigns_draft' => $total_campaigns_draft,
1872
+ );
1873
+
1874
+ return $meta_info;
1875
+ }
1876
+
1877
  }
1878
 
1879
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.icegram.com/
4
  Tags: popup, wordpress popups,Exit-popup, optin-popup, popups, hellobar, optin, lead capture, form, marketing, notification, messenger, targeting, monster, ninja ,wordpress lead generation, wordpress lightbox optin, wordpress lightbox optin form, wordpress lightbox optins, wordpress mobile optin forms, wordpress mobile popup, wordpress mobile popups, wordpress optin form, wordpress overlay popup, wordpress popup, wordpress popup form, wordpress popup plugin, wordpress popup solution, wordpress popups , popups, subscribe, wp popups, optin bars, action grabber, promotion, popup message, leads, lists, builder, action bar, floating bar, footer bar, hellobar alternative, pop over, Popup plugin, aweber, campaign monitor, constant contact, email list, exit-intent, onclick popup, analytics, Hubspot, popup ads, pop-up, Mailing list pop-up, re-targeting, Animation,Popups with Animation ,Responsive Popup, split testing, AB testing
5
  Requires at least: 3.9
6
  Tested up to: 5.2.1
7
- Stable tag: 1.10.28.2
8
  License: GPLv3
9
 
10
  The best WP popup plugin that let's you create a popup within seconds. Customize popup, target popups to show offers, email signups, social buttons etc and instantly increase conversions on your website.
@@ -465,6 +465,9 @@ Initial Release
465
 
466
 
467
  == Changelog ==
 
 
 
468
  = 1.10.28.2 =
469
  * Fix: Fatal error "IG_Tracker_V_1_0_1" class not found.
470
 
4
  Tags: popup, wordpress popups,Exit-popup, optin-popup, popups, hellobar, optin, lead capture, form, marketing, notification, messenger, targeting, monster, ninja ,wordpress lead generation, wordpress lightbox optin, wordpress lightbox optin form, wordpress lightbox optins, wordpress mobile optin forms, wordpress mobile popup, wordpress mobile popups, wordpress optin form, wordpress overlay popup, wordpress popup, wordpress popup form, wordpress popup plugin, wordpress popup solution, wordpress popups , popups, subscribe, wp popups, optin bars, action grabber, promotion, popup message, leads, lists, builder, action bar, floating bar, footer bar, hellobar alternative, pop over, Popup plugin, aweber, campaign monitor, constant contact, email list, exit-intent, onclick popup, analytics, Hubspot, popup ads, pop-up, Mailing list pop-up, re-targeting, Animation,Popups with Animation ,Responsive Popup, split testing, AB testing
5
  Requires at least: 3.9
6
  Tested up to: 5.2.1
7
+ Stable tag: 1.10.29
8
  License: GPLv3
9
 
10
  The best WP popup plugin that let's you create a popup within seconds. Customize popup, target popups to show offers, email signups, social buttons etc and instantly increase conversions on your website.
465
 
466
 
467
  == Changelog ==
468
+ = 1.10.29 =
469
+ * Fix: Fixed security issue in the gallery
470
+
471
  = 1.10.28.2 =
472
  * Fix: Fatal error "IG_Tracker_V_1_0_1" class not found.
473