Temporary Login Without Password - Version 1.5.18

Version Description

Download this release

Release Info

Developer storeapps
Plugin Icon 128x128 Temporary Login Without Password
Version 1.5.18
Comparing to
See all releases

Code changes from version 1.5.17 to 1.5.18

includes/class-wp-temporary-login-without-password.php CHANGED
@@ -42,14 +42,17 @@ class Wp_Temporary_Login_Without_Password {
42
  $this->plugin_name = 'temporary-login-without-password';
43
  $this->version = WTLWP_PLUGIN_VERSION;
44
 
45
- $this->load_dependencies();
 
 
46
  $this->set_locale();
47
  $this->define_admin_hooks();
48
  $this->define_public_hooks();
49
 
50
- $tlwp_tracker = 'IG_Tracker_V_1_0_3';
51
- if(is_admin()) {
52
- $tlwp_feedback = new IG_Feedback_V_1_0_3( 'Temporary Login Without Password', 'temporary-login-without-password', 'tlwp', 'tlwp.', false );
 
53
  $tlwp_feedback->render_deactivate_feedback();
54
  }
55
  }
@@ -59,7 +62,7 @@ class Wp_Temporary_Login_Without_Password {
59
  *
60
  * @since 1.0.0
61
  */
62
- private function load_dependencies() {
63
 
64
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wp-temporary-login-without-password-loader.php';
65
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wp-temporary-login-without-password-i18n.php';
@@ -71,9 +74,12 @@ class Wp_Temporary_Login_Without_Password {
71
 
72
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wtlwp-system-info.php';
73
 
 
74
  // Feedback
75
- require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/feedback/class-ig-tracker-v-1-0-3.php';
76
- require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/feedback/class-ig-feedback-v-1-0-3.php';
 
 
77
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/feedback.php';
78
 
79
  $this->loader = new Wp_Temporary_Login_Without_Password_Loader();
@@ -152,8 +158,8 @@ class Wp_Temporary_Login_Without_Password {
152
  /**
153
  * Get Plugin Name.
154
  *
155
- * @since 1.0.0
156
  * @return string
 
157
  */
158
  public function get_plugin_name() {
159
  return $this->plugin_name;
@@ -162,8 +168,8 @@ class Wp_Temporary_Login_Without_Password {
162
  /**
163
  * Get Loader Class.
164
  *
165
- * @since 1.0.0
166
  * @return string
 
167
  */
168
  public function get_loader() {
169
  return $this->loader;
@@ -172,8 +178,8 @@ class Wp_Temporary_Login_Without_Password {
172
  /**
173
  * Get Plugin Version
174
  *
175
- * @since 1.0.0
176
  * @return string
 
177
  */
178
  public function get_version() {
179
  return $this->version;
42
  $this->plugin_name = 'temporary-login-without-password';
43
  $this->version = WTLWP_PLUGIN_VERSION;
44
 
45
+ $feedback_version = '1.0.7';
46
+
47
+ $this->load_dependencies( $feedback_version );
48
  $this->set_locale();
49
  $this->define_admin_hooks();
50
  $this->define_public_hooks();
51
 
52
+ $tlwp_tracker = 'IG_Tracker_V_' . str_replace( '.', '_', $feedback_version );
53
+ if ( is_admin() ) {
54
+ $ig_feedback_class = 'IG_Feedback_V_' . str_replace( '.', '_', $feedback_version );
55
+ $tlwp_feedback = new $ig_feedback_class( 'Temporary Login Without Password', 'temporary-login-without-password', 'tlwp', 'tlwp.', false );
56
  $tlwp_feedback->render_deactivate_feedback();
57
  }
58
  }
62
  *
63
  * @since 1.0.0
64
  */
65
+ private function load_dependencies( $feedback_version ) {
66
 
67
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wp-temporary-login-without-password-loader.php';
68
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wp-temporary-login-without-password-i18n.php';
74
 
75
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wtlwp-system-info.php';
76
 
77
+
78
  // Feedback
79
+ $feedback_version_for_file = str_replace( '.', '-', $feedback_version );
80
+
81
+ require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/feedback/class-ig-tracker-v-' . $feedback_version_for_file . '.php';
82
+ require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/feedback/class-ig-feedback-v-' . $feedback_version_for_file . '.php';
83
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/feedback.php';
84
 
85
  $this->loader = new Wp_Temporary_Login_Without_Password_Loader();
158
  /**
159
  * Get Plugin Name.
160
  *
 
161
  * @return string
162
+ * @since 1.0.0
163
  */
164
  public function get_plugin_name() {
165
  return $this->plugin_name;
168
  /**
169
  * Get Loader Class.
170
  *
 
171
  * @return string
172
+ * @since 1.0.0
173
  */
174
  public function get_loader() {
175
  return $this->loader;
178
  /**
179
  * Get Plugin Version
180
  *
 
181
  * @return string
182
+ * @since 1.0.0
183
  */
184
  public function get_version() {
185
  return $this->version;
includes/feedback/assets/css/{emoji.css → emoji.min.css} RENAMED
File without changes
includes/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
+ }
includes/feedback/assets/css/{star-rating.css → star-rating.min.css} RENAMED
File without changes
includes/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
  }
includes/feedback/assets/images/loading.gif ADDED
Binary file
includes/feedback/assets/js/{sweetalert2.js → sweetalert2.min.js} RENAMED
File without changes
includes/feedback/{class-ig-feedback-v-1-0-3.php → class-ig-feedback-v-1-0-7.php} RENAMED
@@ -1,33 +1,24 @@
1
  <?php
2
- /**
3
- * IG Feedback
4
- *
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_3
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_3' ) ) {
19
  /**
20
- * Icegram Deactivation Survey.
21
  *
22
- * This prompts the user for more details when they deactivate the plugin.
 
23
  *
24
- * @version 1.0
25
- * @package Icegram
26
- * @author Malay Ladu
27
- * @license GPL-2.0+
28
- * @copyright Copyright (c) 2019
 
29
  */
30
- class IG_Feedback_V_1_0_3 {
31
 
32
  /**
33
  * The API URL where we will send feedback data.
@@ -127,7 +118,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_3' ) ) {
127
  * @since 1.0.1
128
  */
129
  public function enqueue_scripts() {
130
- wp_enqueue_script( 'sweetalert', plugin_dir_url( __FILE__ ) . 'assets/js/sweetalert2.js', array( 'jquery' ) );
131
  }
132
 
133
  /**
@@ -136,19 +127,19 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_3' ) ) {
136
  * @since 1.0.1
137
  */
138
  public function enqueue_styles() {
139
- wp_register_style( 'sweetalert', plugin_dir_url( __FILE__ ) . 'assets/css/sweetalert2.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.css' );
146
  wp_enqueue_style( 'ig-feedback-star-rating' );
147
 
148
- wp_register_style( 'ig-feedback-emoji', plugin_dir_url( __FILE__ ) . 'assets/css/emoji.css' );
149
  wp_enqueue_style( 'ig-feedback-emoji' );
150
 
151
- wp_register_style( 'ig-feedback', plugin_dir_url( __FILE__ ) . 'assets/css/feedback.css' );
152
  wp_enqueue_style( 'ig-feedback' );
153
  }
154
 
@@ -157,8 +148,11 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_3' ) ) {
157
  *
158
  * @param array $params
159
  *
 
 
160
  * @since 1.0.3
161
  */
 
162
  public function prepare_widget_params( $params = array() ) {
163
 
164
  $default_params = array(
@@ -385,23 +379,25 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_3' ) ) {
385
 
386
  ?>
387
 
388
- <form class="ig-general-feedback" id="ig-general-feedback">
389
- <p class="ig-feedback-data-name">
390
- <label class="ig-label">Name</label><br/>
391
- <input type="text" name="feedback_data[name]" id="ig-feedback-data-name" value="<?php echo $params['name']; ?>"/>
392
- </p>
393
- <p class="ig-feedback-data-email">
394
- <label class="ig-label"">Email</label><br/>
395
- <input type="email" name="feedback_data[email]" id="ig-feedback-data-email" value="<?php echo $params['email']; ?>"/>
396
- </p>
397
- <p class="ig-feedback-data-message">
398
- <label class="ig-label"">Feedback</label><br/>
399
- <textarea name="feedback_data[details]" id="ig-feedback-data-message"></textarea>
400
- </p>
401
- <p>
402
- <input type="checkbox" name="feedback_data[collect_system_info]" id="ig-feedback-data-consent"/><?php echo $params['consent_text']; ?>
403
- </p>
404
- </form>
 
 
405
 
406
  <?php
407
 
@@ -450,16 +446,18 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_3' ) ) {
450
 
451
  function validateEmail(email) {
452
  var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
453
- if( !emailReg.test( email ) ) {
454
  return false;
455
  } else {
456
  return true;
457
  }
458
  }
459
 
460
- $('#wpwrap').append('<div class="ig-es-feedback-button">Feedback</div>');
461
 
462
- $('.ig-es-feedback-button').on('click', function () {
 
 
463
 
464
  Swal.mixin({
465
  footer: '<?php echo $this->footer; ?>',
@@ -482,29 +480,18 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_3' ) ) {
482
  },
483
  onOpen: () => {
484
 
485
- Swal.disableButtons();
486
- $('#ig-feedback-data-consent').on('click', function () {
487
- if ($(this).attr('checked') === 'checked') {
488
- Swal.enableButtons();
489
- } else {
490
- Swal.disableButtons();
491
- }
492
- });
493
 
494
  },
495
  preConfirm: () => {
 
 
496
 
497
- var email = $('#ig-feedback-data-email').val();
498
- var name = $('#ig-feedback-data-name').val();
499
- var message = $('#ig-feedback-data-message').val();
500
- var consent = $('#ig-feedback-data-consent').attr('checked');
501
 
502
- if (consent !== 'checked') {
503
- Swal.showValidationMessage('Please give your consent');
504
- return;
505
- }
506
-
507
- if(email !== '' && !validateEmail(email)) {
508
  Swal.showValidationMessage('Please enter valid email');
509
  return;
510
  }
@@ -514,14 +501,17 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_3' ) ) {
514
  return;
515
  }
516
 
517
-
 
 
 
518
 
519
  var meta = {
520
  name: name,
521
  email: email
522
  };
523
 
524
- return doSend(message, meta, true);
525
  }
526
  },
527
 
@@ -582,7 +572,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_3' ) ) {
582
  return;
583
  }
584
 
585
- $title = 'Why are you deactivating Email Subscribers?';
586
  $slug = sanitize_title( $title );
587
  $event = $this->event_prefix . 'plugin.deactivation';
588
 
@@ -592,7 +582,42 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_3' ) ) {
592
  var $deactivateLink = $('#the-list').find('[data-slug="<?php echo $this->plugin; ?>"] span.deactivate a'),
593
  $overlay = $('#ig-deactivate-survey-<?php echo $this->plugin; ?>'),
594
  $form = $overlay.find('form'),
595
- formOpen = false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
596
  // Plugin listing table deactivate link.
597
  $deactivateLink.on('click', function (event) {
598
  event.preventDefault();
@@ -604,22 +629,59 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_3' ) ) {
604
  $form.on('change', 'input[type=radio]', function (event) {
605
  event.preventDefault();
606
  $form.find('input[type=text], .error').hide();
 
607
  $form.find('.ig-deactivate-survey-option').removeClass('selected');
608
  $(this).closest('.ig-deactivate-survey-option').addClass('selected').find('input[type=text]').show();
 
 
 
 
609
  });
610
  // Survey Skip & Deactivate.
611
  $form.on('click', '.ig-deactivate-survey-deactivate', function (event) {
612
  event.preventDefault();
613
  location.href = $deactivateLink.attr('href');
614
  });
 
 
 
 
 
 
 
 
 
 
 
 
615
  // Survey submit.
616
  $form.submit(function (event) {
617
  event.preventDefault();
 
618
  if (!$form.find('input[type=radio]:checked').val()) {
619
  $form.find('.ig-deactivate-survey-footer').prepend('<span class="error"><?php echo esc_js( __( 'Please select an option', 'email-subscribers' ) ); ?></span>');
620
  return;
621
  }
622
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
623
  var data = {
624
  action: '<?php echo $this->ajax_action; ?>',
625
  feedback: {
@@ -637,7 +699,9 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_3' ) ) {
637
  plugin: '<?php echo $this->plugin; ?>',
638
  plugin_abbr: '<?php echo $this->plugin_abbr; ?>',
639
  is_dev_mode: '<?php echo $this->is_dev_mode; ?>',
640
- set_cookie: ''
 
 
641
  }
642
  };
643
 
@@ -714,6 +778,22 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_3' ) ) {
714
  margin: 0 0 18px 0;
715
  }
716
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
717
  .ig-deactivate-survey-title span {
718
  color: #999;
719
  margin-right: 10px;
@@ -750,6 +830,11 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_3' ) ) {
750
  text-decoration: none;
751
  padding-top: 7px;
752
  }
 
 
 
 
 
753
  </style>
754
  <?php
755
  }
@@ -765,6 +850,8 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_3' ) ) {
765
  return;
766
  }
767
 
 
 
768
  $options = array(
769
  1 => array(
770
  'title' => esc_html__( 'I no longer need the plugin', 'email-subscribers' ),
@@ -808,8 +895,17 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_3' ) ) {
808
  </div>
809
  <?php endforeach; ?>
810
  </div>
 
 
 
 
 
 
 
 
811
  <div class="ig-deactivate-survey-footer">
812
  <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>
 
813
  <a href="#" class="ig-deactivate-survey-deactivate"><?php echo sprintf( esc_html__( 'Skip %s Deactivate', 'email-subscribers' ), '&amp;' ); ?></a>
814
  </div>
815
  </form>
@@ -874,8 +970,15 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_3' ) ) {
874
  if ( false === strpos( $url, 'http://' ) && false === strpos( $url, 'https://' ) ) {
875
  $url = 'http://' . $url;
876
  }
 
877
  $url_parts = parse_url( $url );
878
  $host = ! empty( $url_parts['host'] ) ? $url_parts['host'] : false;
 
 
 
 
 
 
879
  if ( ! empty( $url ) && ! empty( $host ) ) {
880
  if ( false !== ip2long( $host ) ) {
881
  if ( ! filter_var( $host, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE ) ) {
@@ -1003,7 +1106,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_3' ) ) {
1003
  $plugin_abbr = ! empty( $data['misc']['plugin_abbr'] ) ? $data['misc']['plugin_abbr'] : 'ig_feedback';
1004
  $is_dev_mode = ! empty( $data['misc']['is_dev_mode'] ) ? $data['misc']['is_dev_mode'] : false;
1005
  $set_transient = ! empty( $data['misc']['set_transient'] ) ? $data['misc']['set_transient'] : false;
1006
- $system_info = ! empty( $data['misc']['system_info'] ) ? $data['misc']['system_info'] : false;
1007
  $meta_info = ! empty( $data['misc']['meta_info'] ) ? $data['misc']['meta_info'] : array();
1008
 
1009
  unset( $data['misc'] );
1
  <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit; // Exit if accessed directly.
5
+ }
6
+
7
+ if ( ! class_exists( 'IG_Feedback_V_1_0_7' ) ) {
 
 
 
 
 
 
 
 
 
 
 
8
  /**
9
+ * IG Feedback
10
  *
11
+ * The IG Feedback class adds functionality to get quick interactive feedback from users.
12
+ * There are different types of feedabck widget like Stars, Emoji, Thubms Up/ Down, Number etc.
13
  *
14
+ * @class IG_Feedback_V_1_0_7
15
+ * @package feedback
16
+ * @copyright Copyright (c) 2019, Icegram
17
+ * @license https://opensource.org/licenses/gpl-license GNU Public License
18
+ * @author Icegram
19
+ * @since 1.0.0
20
  */
21
+ class IG_Feedback_V_1_0_7 {
22
 
23
  /**
24
  * The API URL where we will send feedback data.
118
  * @since 1.0.1
119
  */
120
  public function enqueue_scripts() {
121
+ wp_enqueue_script( 'sweetalert', plugin_dir_url( __FILE__ ) . 'assets/js/sweetalert2.min.js', array( 'jquery' ) );
122
  }
123
 
124
  /**
127
  * @since 1.0.1
128
  */
129
  public function enqueue_styles() {
130
+ wp_register_style( 'sweetalert', plugin_dir_url( __FILE__ ) . 'assets/css/sweetalert2.min.css' );
131
  wp_enqueue_style( 'sweetalert' );
132
 
133
  wp_register_style( 'animate', plugin_dir_url( __FILE__ ) . 'assets/css/animate.min.css' );
134
  wp_enqueue_style( 'animate' );
135
 
136
+ wp_register_style( 'ig-feedback-star-rating', plugin_dir_url( __FILE__ ) . 'assets/css/star-rating.min.css' );
137
  wp_enqueue_style( 'ig-feedback-star-rating' );
138
 
139
+ wp_register_style( 'ig-feedback-emoji', plugin_dir_url( __FILE__ ) . 'assets/css/emoji.min.css' );
140
  wp_enqueue_style( 'ig-feedback-emoji' );
141
 
142
+ wp_register_style( 'ig-feedback', plugin_dir_url( __FILE__ ) . 'assets/css/feedback.min.css' );
143
  wp_enqueue_style( 'ig-feedback' );
144
  }
145
 
148
  *
149
  * @param array $params
150
  *
151
+ * @return array
152
+ *
153
  * @since 1.0.3
154
  */
155
+
156
  public function prepare_widget_params( $params = array() ) {
157
 
158
  $default_params = array(
379
 
380
  ?>
381
 
382
+ <div class="ig-general-feedback" id="ig-general-feedback-<?php echo $this->plugin; ?>">
383
+ <form class="ig-general-feedback" id="ig-general-feedback">
384
+ <p class="ig-feedback-data-name">
385
+ <label class="ig-label">Name</label><br/>
386
+ <input type="text" name="feedback_data[name]" id="ig-feedback-data-name" value="<?php echo $params['name']; ?>"/>
387
+ </p>
388
+ <p class="ig-feedback-data-email">
389
+ <label class="ig-label"">Email</label><br/>
390
+ <input type="email" name="feedback_data[email]" id="ig-feedback-data-email" value="<?php echo $params['email']; ?>"/>
391
+ </p>
392
+ <p class="ig-feedback-data-message">
393
+ <label class="ig-label"">Feedback</label><br/>
394
+ <textarea name="feedback_data[details]" id="ig-feedback-data-message"></textarea>
395
+ </p>
396
+ <p>
397
+ <input type="checkbox" name="feedback_data[collect_system_info]" checked="checked" id="ig-feedback-data-consent"/><?php echo $params['consent_text']; ?>
398
+ </p>
399
+ </form>
400
+ </div>
401
 
402
  <?php
403
 
446
 
447
  function validateEmail(email) {
448
  var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
449
+ if (!emailReg.test(email)) {
450
  return false;
451
  } else {
452
  return true;
453
  }
454
  }
455
 
456
+ var feedbackButtonID = 'ig-feedback-button-<?php echo $this->plugin; ?>';
457
 
458
+ $('#wpwrap').append('<div class="ig-es-feedback-button" id="' + feedbackButtonID + '">Feedback</div>');
459
+
460
+ $('#' + feedbackButtonID).on('click', function () {
461
 
462
  Swal.mixin({
463
  footer: '<?php echo $this->footer; ?>',
480
  },
481
  onOpen: () => {
482
 
 
 
 
 
 
 
 
 
483
 
484
  },
485
  preConfirm: () => {
486
+ var $overlay = $('#ig-general-feedback-<?php echo $this->plugin; ?>');
487
+ var $form = $overlay.find('form');
488
 
489
+ var email = $form.find('#ig-feedback-data-email').val();
490
+ var name = $form.find('#ig-feedback-data-name').val();
491
+ var message = $form.find('#ig-feedback-data-message').val();
492
+ var consent = $form.find('#ig-feedback-data-consent').attr('checked');
493
 
494
+ if (email !== '' && !validateEmail(email)) {
 
 
 
 
 
495
  Swal.showValidationMessage('Please enter valid email');
496
  return;
497
  }
501
  return;
502
  }
503
 
504
+ var system_info = false;
505
+ if (consent === 'checked') {
506
+ system_info = true;
507
+ }
508
 
509
  var meta = {
510
  name: name,
511
  email: email
512
  };
513
 
514
+ return doSend(message, meta, system_info);
515
  }
516
  },
517
 
572
  return;
573
  }
574
 
575
+ $title = 'Why are you deactivating ' . $this->name . '?';
576
  $slug = sanitize_title( $title );
577
  $event = $this->event_prefix . 'plugin.deactivation';
578
 
582
  var $deactivateLink = $('#the-list').find('[data-slug="<?php echo $this->plugin; ?>"] span.deactivate a'),
583
  $overlay = $('#ig-deactivate-survey-<?php echo $this->plugin; ?>'),
584
  $form = $overlay.find('form'),
585
+ formOpen = false,
586
+ consent = $('#ig-deactivate-survey-help-consent-<?php echo $this->plugin; ?>');
587
+
588
+ function togglePersonalInfoFields(show) {
589
+
590
+ if (show) {
591
+ $form.find('#ig-deactivate-survey-info-name').show();
592
+ $form.find('#ig-deactivate-survey-info-email-address').show();
593
+ $form.find('#ig-deactivate-survey-consent-additional-data').show();
594
+ } else {
595
+ $form.find('#ig-deactivate-survey-info-name').hide();
596
+ $form.find('#ig-deactivate-survey-info-email-address').hide();
597
+ $form.find('#ig-deactivate-survey-consent-additional-data').hide();
598
+ }
599
+
600
+ };
601
+
602
+ function loader($show) {
603
+
604
+ if ($show) {
605
+ $form.find('#ig-deactivate-survey-loader').show();
606
+ } else {
607
+ $form.find('#ig-deactivate-survey-loader').hide();
608
+ }
609
+
610
+ }
611
+
612
+ function validateEmail(email) {
613
+ var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
614
+ if (!emailReg.test(email)) {
615
+ return false;
616
+ } else {
617
+ return true;
618
+ }
619
+ };
620
+
621
  // Plugin listing table deactivate link.
622
  $deactivateLink.on('click', function (event) {
623
  event.preventDefault();
629
  $form.on('change', 'input[type=radio]', function (event) {
630
  event.preventDefault();
631
  $form.find('input[type=text], .error').hide();
632
+
633
  $form.find('.ig-deactivate-survey-option').removeClass('selected');
634
  $(this).closest('.ig-deactivate-survey-option').addClass('selected').find('input[type=text]').show();
635
+
636
+ if (consent.attr('checked') === 'checked') {
637
+ togglePersonalInfoFields(true);
638
+ }
639
  });
640
  // Survey Skip & Deactivate.
641
  $form.on('click', '.ig-deactivate-survey-deactivate', function (event) {
642
  event.preventDefault();
643
  location.href = $deactivateLink.attr('href');
644
  });
645
+
646
+ // Help Consent
647
+ togglePersonalInfoFields(false);
648
+ loader(false);
649
+ consent.on('click', function () {
650
+ if (consent.attr('checked') === 'checked') {
651
+ togglePersonalInfoFields(true);
652
+ } else {
653
+ togglePersonalInfoFields(false);
654
+ }
655
+ });
656
+
657
  // Survey submit.
658
  $form.submit(function (event) {
659
  event.preventDefault();
660
+ loader(true);
661
  if (!$form.find('input[type=radio]:checked').val()) {
662
  $form.find('.ig-deactivate-survey-footer').prepend('<span class="error"><?php echo esc_js( __( 'Please select an option', 'email-subscribers' ) ); ?></span>');
663
  return;
664
  }
665
 
666
+ var system_info = false;
667
+ var name = '';
668
+ var email = '';
669
+
670
+ if (consent.attr('checked') === 'checked') {
671
+ name = $form.find('#ig-deactivate-survey-info-name').val();
672
+ email = $form.find('#ig-deactivate-survey-info-email-address').val();
673
+ if (email === '' || !validateEmail(email)) {
674
+ alert('Please enter valid email');
675
+ return;
676
+ }
677
+ system_info = true;
678
+ }
679
+
680
+ var meta = {
681
+ name: name,
682
+ email: email
683
+ };
684
+
685
  var data = {
686
  action: '<?php echo $this->ajax_action; ?>',
687
  feedback: {
699
  plugin: '<?php echo $this->plugin; ?>',
700
  plugin_abbr: '<?php echo $this->plugin_abbr; ?>',
701
  is_dev_mode: '<?php echo $this->is_dev_mode; ?>',
702
+ set_cookie: '',
703
+ meta_info: meta,
704
+ system_info: system_info
705
  }
706
  };
707
 
778
  margin: 0 0 18px 0;
779
  }
780
 
781
+ .ig-deactivate-survey-options {
782
+ border-bottom: 1px solid #ddd;
783
+ padding: 0 0 18px 0;
784
+ margin: 0 0 18px 0;
785
+ }
786
+
787
+ .ig-deactivate-survey-info-data {
788
+ padding: 0 0 18px 0;
789
+ margin: 10px 10px 10px 30px;
790
+ }
791
+
792
+ .ig-deactivate-survey-info-name, .ig-deactivate-survey-info-email-address {
793
+ width: 230px;
794
+ margin: 10px;
795
+ }
796
+
797
  .ig-deactivate-survey-title span {
798
  color: #999;
799
  margin-right: 10px;
830
  text-decoration: none;
831
  padding-top: 7px;
832
  }
833
+
834
+ .ig-deactivate-survey-loader {
835
+ vertical-align: middle;
836
+ padding: 10px;
837
+ }
838
  </style>
839
  <?php
840
  }
850
  return;
851
  }
852
 
853
+ $email = get_option( 'admin_email' );
854
+
855
  $options = array(
856
  1 => array(
857
  'title' => esc_html__( 'I no longer need the plugin', 'email-subscribers' ),
895
  </div>
896
  <?php endforeach; ?>
897
  </div>
898
+ <div class="ig-deactivate-survey-help-consent">
899
+ <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>
900
+ </div>
901
+ <div class="ig-deactivate-survey-info-data">
902
+
903
+ <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=""/>
904
+ <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; ?>"/>
905
+ </div>
906
  <div class="ig-deactivate-survey-footer">
907
  <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>
908
+ <img class="ig-deactivate-survey-loader" id="ig-deactivate-survey-loader" src="<?php echo plugin_dir_url( __FILE__ ); ?>/assets/images/loading.gif"/>
909
  <a href="#" class="ig-deactivate-survey-deactivate"><?php echo sprintf( esc_html__( 'Skip %s Deactivate', 'email-subscribers' ), '&amp;' ); ?></a>
910
  </div>
911
  </form>
970
  if ( false === strpos( $url, 'http://' ) && false === strpos( $url, 'https://' ) ) {
971
  $url = 'http://' . $url;
972
  }
973
+
974
  $url_parts = parse_url( $url );
975
  $host = ! empty( $url_parts['host'] ) ? $url_parts['host'] : false;
976
+
977
+ // Discard our development environment
978
+ if ( '192.168.0.112' === $host ) {
979
+ return false;
980
+ }
981
+
982
  if ( ! empty( $url ) && ! empty( $host ) ) {
983
  if ( false !== ip2long( $host ) ) {
984
  if ( ! filter_var( $host, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE ) ) {
1106
  $plugin_abbr = ! empty( $data['misc']['plugin_abbr'] ) ? $data['misc']['plugin_abbr'] : 'ig_feedback';
1107
  $is_dev_mode = ! empty( $data['misc']['is_dev_mode'] ) ? $data['misc']['is_dev_mode'] : false;
1108
  $set_transient = ! empty( $data['misc']['set_transient'] ) ? $data['misc']['set_transient'] : false;
1109
+ $system_info = ( isset( $data['misc']['system_info'] ) && $data['misc']['system_info'] === 'true' ) ? true : false;
1110
  $meta_info = ! empty( $data['misc']['meta_info'] ) ? $data['misc']['meta_info'] : array();
1111
 
1112
  unset( $data['misc'] );
includes/feedback/{class-ig-tracker-v-1-0-3.php → class-ig-tracker-v-1-0-7.php} RENAMED
@@ -4,17 +4,23 @@ if ( ! defined( 'ABSPATH' ) ) {
4
  exit; // Exit if accessed directly.
5
  }
6
 
7
- if ( ! class_exists( 'IG_Tracker_V_1_0_3' ) ) {
8
 
9
  /**
10
- * Icegram tracker.
11
  *
12
  * Icegram tracker handler class is responsible for sending anonymous plugin
13
  * data to Icegram servers for users that actively allowed data tracking.
14
  *
15
- * @since 1.0.0
 
 
 
 
 
 
16
  */
17
- class IG_Tracker_V_1_0_3 {
18
 
19
  /**
20
  * Get Active, Inactive or all plugins info
4
  exit; // Exit if accessed directly.
5
  }
6
 
7
+ if ( ! class_exists( 'IG_Tracker_V_1_0_7' ) ) {
8
 
9
  /**
10
+ * Class IG_Tracker_V_1_0_7
11
  *
12
  * Icegram tracker handler class is responsible for sending anonymous plugin
13
  * data to Icegram servers for users that actively allowed data tracking.
14
  *
15
+ * @class IG_Tracker_V_1_0_7
16
+ * @package feedback
17
+ * @copyright Copyright (c) 2019, Icegram
18
+ * @license https://opensource.org/licenses/gpl-license GNU Public License
19
+ * @author Icegram
20
+ * @since 1.0.0
21
+ *
22
  */
23
+ class IG_Tracker_V_1_0_7 {
24
 
25
  /**
26
  * Get Active, Inactive or all plugins info
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: storeapps, niravmehta, malayladu
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CPTHCDC382KVA
4
  Tags: temporary access, developer access, admin login, temporary login, passwordless login, customer login, secure login, access, admin, log in, login, login security, protection, user login, user login, wordpress admin login, wordpress login, wp-admin, wp-login, expiration, login, Login Without Password, user, WordPress Admin, wp-admin, developer login
5
  Requires at least: 3.0.1
6
- Tested up to: 5.2.1
7
- Stable tag: 1.5.17
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -67,6 +67,10 @@ No. at this moment it's not possible to do this.
67
 
68
  == Changelog ==
69
 
 
 
 
 
70
  **1.5.17 [2019-06-17]**
71
 
72
  * New: added "locale" support for temporary user
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CPTHCDC382KVA
4
  Tags: temporary access, developer access, admin login, temporary login, passwordless login, customer login, secure login, access, admin, log in, login, login security, protection, user login, user login, wordpress admin login, wordpress login, wp-admin, wp-login, expiration, login, Login Without Password, user, WordPress Admin, wp-admin, developer login
5
  Requires at least: 3.0.1
6
+ Tested up to: 5.2.2
7
+ Stable tag: 1.5.18
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
67
 
68
  == Changelog ==
69
 
70
+ **1.5.18 [2019-07-29]**
71
+
72
+ * Fix: Browser console error
73
+
74
  **1.5.17 [2019-06-17]**
75
 
76
  * New: added "locale" support for temporary user
temporary-login-without-password.php CHANGED
@@ -3,11 +3,11 @@
3
  * Plugin Name: Temporary Login Without Password
4
  * Plugin URI: http://www.storeapps.org/create-secure-login-without-password-for-wordpress/
5
  * Description: Create a temporary login link with any role using which one can access to your sytem without username and password for limited period of time.
6
- * Version: 1.5.17
7
  * Author: StoreApps
8
  * Author URI: https://storeapps.org
9
  * Requires at least: 3.0.1
10
- * Tested up to: 5.2.1
11
  * License: GPLv3
12
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
13
  * Text Domain: temporary-login-without-password
@@ -26,10 +26,8 @@ if ( ! defined( 'WPINC' ) ) {
26
  * Define constants
27
  */
28
  define( 'WTLWP_PLUGIN_DIR', dirname( __FILE__ ) );
29
- define( 'WTLWP_PLUGIN_VERSION', '1.5.17' );
30
  define( 'WTLWP_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );
31
- define( 'TLWP_FEEDBACK_WIDGET_CLASS', dirname( __FILE__ ) . '/feedback/class-sa-feedback-1-0.php');
32
- define( 'TLWP_DEV_MODE', true);
33
 
34
  /**
35
  * Deactivate Temporary Login Without Password
3
  * Plugin Name: Temporary Login Without Password
4
  * Plugin URI: http://www.storeapps.org/create-secure-login-without-password-for-wordpress/
5
  * Description: Create a temporary login link with any role using which one can access to your sytem without username and password for limited period of time.
6
+ * Version: 1.5.18
7
  * Author: StoreApps
8
  * Author URI: https://storeapps.org
9
  * Requires at least: 3.0.1
10
+ * Tested up to: 5.2.2
11
  * License: GPLv3
12
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
13
  * Text Domain: temporary-login-without-password
26
  * Define constants
27
  */
28
  define( 'WTLWP_PLUGIN_DIR', dirname( __FILE__ ) );
29
+ define( 'WTLWP_PLUGIN_VERSION', '1.5.18' );
30
  define( 'WTLWP_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );
 
 
31
 
32
  /**
33
  * Deactivate Temporary Login Without Password