Version Description
Download this release
Release Info
Developer | storeapps |
Plugin | Temporary Login Without Password |
Version | 1.5.22 |
Comparing to | |
See all releases |
Code changes from version 1.5.21 to 1.5.22
- admin/class-wp-temporary-login-without-password-admin.php +0 -102
- admin/css/wp-temporary-login-without-password-common.css +0 -12
- admin/js/wp-temporary-login-without-password-admin.js +0 -14
- includes/class-wp-temporary-login-without-password-common.php +1 -41
- includes/class-wp-temporary-login-without-password.php +0 -9
- includes/feedback.php +65 -1
- includes/feedback/class-ig-feedback.php +258 -23
- includes/feedback/class-ig-tracker.php +13 -10
- readme.txt +5 -2
- temporary-login-without-password.php +5 -4
admin/class-wp-temporary-login-without-password-admin.php
CHANGED
@@ -58,11 +58,6 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
58 |
wp_enqueue_style( 'jquery-ui-css', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css' );
|
59 |
}
|
60 |
}
|
61 |
-
|
62 |
-
if ( ! wp_style_is( 'tlwp-common-css', 'enqueued' ) ) {
|
63 |
-
wp_enqueue_style( 'tlwp-common-css', plugin_dir_url( __FILE__ ) . 'css/wp-temporary-login-without-password-common.css', array(), $this->version, 'all' );
|
64 |
-
}
|
65 |
-
|
66 |
}
|
67 |
|
68 |
/**
|
@@ -492,7 +487,6 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
492 |
echo $notice;
|
493 |
}
|
494 |
|
495 |
-
|
496 |
return;
|
497 |
}
|
498 |
|
@@ -519,102 +513,6 @@ class Wp_Temporary_Login_Without_Password_Admin {
|
|
519 |
return true;
|
520 |
}
|
521 |
|
522 |
-
/**
|
523 |
-
* Change the admin footer text on temporary login admin pages.
|
524 |
-
*
|
525 |
-
* @param string $footer_text
|
526 |
-
*
|
527 |
-
* @return string
|
528 |
-
* @since 1.4.3
|
529 |
-
*
|
530 |
-
*/
|
531 |
-
public function admin_footer_text( $footer_text ) {
|
532 |
-
|
533 |
-
$current_screen = get_current_screen();
|
534 |
-
|
535 |
-
if ( isset( $current_screen->id ) && 'users_page_wp-temporary-login-without-password' === $current_screen->id ) {
|
536 |
-
|
537 |
-
$current_user_id = get_current_user_id();
|
538 |
-
$can_ask_for_review = Wp_Temporary_Login_Without_Password_Common::can_ask_for_review( $current_user_id );
|
539 |
-
|
540 |
-
// Change the footer text.
|
541 |
-
if ( $can_ask_for_review ) {
|
542 |
-
$footer_text = sprintf( __( 'If you like <strong>Temporary Login Without Password</strong> plugin, please leave us a %s rating. A huge thanks in advance!', 'temporary-login-without-password' ),
|
543 |
-
'<a href="https://wordpress.org/support/plugin/temporary-login-without-password/reviews" target="_blank" class="tlwp-rating-link" data-rated="' . esc_attr__( 'Thank You :) ', 'temporary-login-without-password' ) . '">★★★★★</a>' );
|
544 |
-
} else {
|
545 |
-
$footer_text = sprintf( __( 'Thank you for using %s.', 'temporary-login-without-password' ), '<a href="https://wordpress.org/plugins/temporary-login-without-password/" target="_blank">Temporary Login Without Password</a>' );
|
546 |
-
}
|
547 |
-
}
|
548 |
-
|
549 |
-
return $footer_text;
|
550 |
-
}
|
551 |
-
|
552 |
-
/**
|
553 |
-
* Triggered when clicking the rating footer.
|
554 |
-
*/
|
555 |
-
public static function tlwp_rated() {
|
556 |
-
$current_user_id = get_current_user_id();
|
557 |
-
update_user_meta( $current_user_id, 'tlwp_admin_footer_text_rated', 1 );
|
558 |
-
update_user_meta( $current_user_id, 'tlwp_review_time', time() );
|
559 |
-
update_user_meta( $current_user_id, 'tlwp_review_from', 'footer' );
|
560 |
-
wp_die();
|
561 |
-
}
|
562 |
-
|
563 |
-
/**
|
564 |
-
* Triggered when clicking the rating link from header.
|
565 |
-
*/
|
566 |
-
public static function tlwp_reivew_header() {
|
567 |
-
$current_user_id = get_current_user_id();
|
568 |
-
update_user_meta( $current_user_id, 'tlwp_admin_header_text_rated', 1 );
|
569 |
-
update_user_meta( $current_user_id, 'tlwp_review_time', time() );
|
570 |
-
update_user_meta( $current_user_id, 'tlwp_review_from', 'header' );
|
571 |
-
wp_die();
|
572 |
-
}
|
573 |
-
|
574 |
-
/**
|
575 |
-
* Prepare a HTML for the review
|
576 |
-
*
|
577 |
-
* @since 1.4.5
|
578 |
-
*/
|
579 |
-
public function tlwp_ask_user_for_review() {
|
580 |
-
|
581 |
-
$current_user_id = get_current_user_id();
|
582 |
-
|
583 |
-
$nobug = '';
|
584 |
-
|
585 |
-
if ( isset( $_GET['tlwp_nobug'] ) ) { // Input var okay.
|
586 |
-
$nobug = absint( esc_attr( wp_unslash( $_GET['tlwp_nobug'] ) ) );
|
587 |
-
}
|
588 |
-
|
589 |
-
if ( 1 === $nobug ) {
|
590 |
-
update_user_meta( $current_user_id, 'tlwp_no_bug', 1 );
|
591 |
-
update_user_meta( $current_user_id, 'tlwp_no_bug_time', time() );
|
592 |
-
}
|
593 |
-
|
594 |
-
$current_user_id = get_current_user_id();
|
595 |
-
$can_ask_for_review = Wp_Temporary_Login_Without_Password_Common::can_ask_for_review( $current_user_id );
|
596 |
-
|
597 |
-
if ( $can_ask_for_review ) {
|
598 |
-
|
599 |
-
$reviewurl = 'https://wordpress.org/support/plugin/temporary-login-without-password/reviews/';
|
600 |
-
|
601 |
-
$current_page_url = "//" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
602 |
-
|
603 |
-
$nobugurl = add_query_arg( 'tlwp_nobug', 1, $current_page_url );
|
604 |
-
|
605 |
-
$icon_url = plugin_dir_url( __FILE__ ) . 'assets/images/icon-64.png';
|
606 |
-
|
607 |
-
echo '<div class="notice notice-warning">';
|
608 |
-
echo '<span style="float: left;"><img style="height=90px; width=90px;" src="' . $icon_url . '" /></span>';
|
609 |
-
echo __( "<span><p>We hope you're enjoying <b>Temporary Login Without Password</b> plugin! Could you please do us a BIG favor and give us a 5-star rating on WordPress to help us spread the word and boost our motivation?</p>", "temporary-login-without-password" );
|
610 |
-
echo "<ul class='tlwp-notice-links'>";
|
611 |
-
echo sprintf( '<li><a href="%s" class="tlwp-rating-link-header" target="_blank" data-rated="' . esc_attr__( "Thank You :) ",
|
612 |
-
'temporary-login-without-password' ) . '"><span class="dashicons dashicons-external"></span> Ok, you deserve it!</a></li> <li><a href="%s"><span class="dashicons dashicons-calendar-alt"></span> Maybe later</a></li>', esc_url( $reviewurl ), esc_url( $nobugurl ) );
|
613 |
-
echo "</ul></span>";
|
614 |
-
echo '</div>';
|
615 |
-
}
|
616 |
-
}
|
617 |
-
|
618 |
/**
|
619 |
*
|
620 |
* Disable plugin deactivation link for the temporary user
|
58 |
wp_enqueue_style( 'jquery-ui-css', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css' );
|
59 |
}
|
60 |
}
|
|
|
|
|
|
|
|
|
|
|
61 |
}
|
62 |
|
63 |
/**
|
487 |
echo $notice;
|
488 |
}
|
489 |
|
|
|
490 |
return;
|
491 |
}
|
492 |
|
513 |
return true;
|
514 |
}
|
515 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
516 |
/**
|
517 |
*
|
518 |
* Disable plugin deactivation link for the temporary user
|
admin/css/wp-temporary-login-without-password-common.css
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
.tlwp-notice-links li {
|
2 |
-
display: inline-block;
|
3 |
-
margin-right: 15px;
|
4 |
-
}
|
5 |
-
|
6 |
-
.tlwp-notice-links li a {
|
7 |
-
display: inline-block;
|
8 |
-
color: #10738b;
|
9 |
-
text-decoration: none;
|
10 |
-
padding-left: 26px;
|
11 |
-
position: relative;
|
12 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/wp-temporary-login-without-password-admin.js
CHANGED
@@ -71,20 +71,6 @@
|
|
71 |
}
|
72 |
);
|
73 |
|
74 |
-
jQuery( 'a.tlwp-rating-link' ).click(
|
75 |
-
function () {
|
76 |
-
jQuery.post( data.admin_ajax_url, {action: 'tlwp_rated'} );
|
77 |
-
jQuery( this ).parent().text( jQuery( this ).data( 'rated' ) );
|
78 |
-
}
|
79 |
-
);
|
80 |
-
|
81 |
-
jQuery( 'a.tlwp-rating-link-header' ).click(
|
82 |
-
function () {
|
83 |
-
jQuery.post( data.admin_ajax_url, {action: 'tlwp_reivew_header'} );
|
84 |
-
jQuery( this ).parent().text( jQuery( this ).data( 'rated' ) );
|
85 |
-
}
|
86 |
-
);
|
87 |
-
|
88 |
function showDatePicker(value, datePickerClass) {
|
89 |
|
90 |
var customDatePickerClass = '';
|
71 |
}
|
72 |
);
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
function showDatePicker(value, datePickerClass) {
|
75 |
|
76 |
var customDatePickerClass = '';
|
includes/class-wp-temporary-login-without-password-common.php
CHANGED
@@ -625,7 +625,7 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
625 |
// Make it compatible with iThemes Security plugin with Custom URL Login enabled
|
626 |
$login_url = apply_filters( 'itsec_notify_admin_page_url', $login_url );
|
627 |
|
628 |
-
return apply_filters('tlwp_login_link', $login_url, $user_id);
|
629 |
|
630 |
}
|
631 |
|
@@ -896,46 +896,6 @@ class Wp_Temporary_Login_Without_Password_Common {
|
|
896 |
return $mailto_link;
|
897 |
}
|
898 |
|
899 |
-
/**
|
900 |
-
* Can we ask user for review?
|
901 |
-
*
|
902 |
-
* @param int $current_user_id
|
903 |
-
*
|
904 |
-
* @return bool
|
905 |
-
* @since 1.4.5
|
906 |
-
*
|
907 |
-
*/
|
908 |
-
public static function can_ask_for_review( $current_user_id ) {
|
909 |
-
|
910 |
-
// Don't show 5 star review notice to temporary user
|
911 |
-
if ( ! empty( $current_user_id ) && self::is_valid_temporary_login( $current_user_id ) ) {
|
912 |
-
return false;
|
913 |
-
}
|
914 |
-
|
915 |
-
$tlwp_nobug = get_user_meta( $current_user_id, 'tlwp_no_bug', true );
|
916 |
-
$no_bug_days_before = 1;
|
917 |
-
$tlwp_nobug_no_time = get_user_meta( $current_user_id, 'tlwp_no_bug_time', true );
|
918 |
-
|
919 |
-
if ( ! empty( $tlwp_nobug_no_time ) && 0 !== $tlwp_nobug_no_time ) {
|
920 |
-
$no_bug_time_diff = time() - $tlwp_nobug_no_time;
|
921 |
-
$no_bug_days_before = floor( $no_bug_time_diff / 86400 ); // 86400 seconds == 1 day
|
922 |
-
}
|
923 |
-
|
924 |
-
$tlwp_rated = get_user_meta( $current_user_id, 'tlwp_admin_footer_text_rated', true );
|
925 |
-
$tlwp_rated_header = get_user_meta( $current_user_id, 'tlwp_admin_header_text_rated', true );
|
926 |
-
$temporary_logins = self::get_temporary_logins();
|
927 |
-
$total_logins = count( $temporary_logins );
|
928 |
-
|
929 |
-
// Is user fall in love with our plugin in 60 days after they said no for the review?
|
930 |
-
// But, make sure we are asking user only after 60 days.
|
931 |
-
// We are good people. Respect the user decision.
|
932 |
-
if ( ( $tlwp_nobug && $no_bug_days_before < 60 ) || $tlwp_rated || $tlwp_rated_header || ( $total_logins < 1 ) ) {
|
933 |
-
return false;
|
934 |
-
}
|
935 |
-
|
936 |
-
return true;
|
937 |
-
}
|
938 |
-
|
939 |
/**
|
940 |
* Render Quick Feedback Widget
|
941 |
*
|
625 |
// Make it compatible with iThemes Security plugin with Custom URL Login enabled
|
626 |
$login_url = apply_filters( 'itsec_notify_admin_page_url', $login_url );
|
627 |
|
628 |
+
return apply_filters( 'tlwp_login_link', $login_url, $user_id );
|
629 |
|
630 |
}
|
631 |
|
896 |
return $mailto_link;
|
897 |
}
|
898 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
899 |
/**
|
900 |
* Render Quick Feedback Widget
|
901 |
*
|
includes/class-wp-temporary-login-without-password.php
CHANGED
@@ -110,20 +110,11 @@ class Wp_Temporary_Login_Without_Password {
|
|
110 |
$this->loader->add_action( 'admin_init', $plugin_admin, 'create_user' );
|
111 |
$this->loader->add_action( 'admin_init', $plugin_admin, 'update_tlwp_settings' );
|
112 |
$this->loader->add_action( 'admin_init', $plugin_admin, 'manage_temporary_login' );
|
113 |
-
$this->loader->add_action( 'admin_notices', $plugin_admin, 'tlwp_ask_user_for_review' );
|
114 |
$this->loader->add_action( 'admin_notices', $plugin_admin, 'display_admin_notices' );
|
115 |
|
116 |
-
$this->loader->add_action( 'wp_ajax_tlwp_rated', $plugin_admin, 'tlwp_rated' );
|
117 |
-
$this->loader->add_action( 'wp_ajax_tlwp_reivew_header', $plugin_admin, 'tlwp_reivew_header' );
|
118 |
-
|
119 |
$this->loader->add_filter( 'wpmu_welcome_notification', $plugin_admin, 'disable_welcome_notification', 10, 5 );
|
120 |
-
$this->loader->add_filter( 'admin_footer_text', $plugin_admin, 'admin_footer_text', 1 );
|
121 |
$this->loader->add_filter( 'plugin_action_links', $plugin_admin, 'disable_plugin_deactivation', 10, 4 );
|
122 |
$this->loader->add_filter( 'plugin_action_links_' . WTLWP_PLUGIN_BASE_NAME, $plugin_admin, 'plugin_add_settings_link', 10, 4 );
|
123 |
-
|
124 |
-
|
125 |
-
// $feedback = new TLWP_Feedback( 'Temporary Login Without Password', 'temporary-login-without-password', 'tlwp' );
|
126 |
-
|
127 |
}
|
128 |
|
129 |
/**
|
110 |
$this->loader->add_action( 'admin_init', $plugin_admin, 'create_user' );
|
111 |
$this->loader->add_action( 'admin_init', $plugin_admin, 'update_tlwp_settings' );
|
112 |
$this->loader->add_action( 'admin_init', $plugin_admin, 'manage_temporary_login' );
|
|
|
113 |
$this->loader->add_action( 'admin_notices', $plugin_admin, 'display_admin_notices' );
|
114 |
|
|
|
|
|
|
|
115 |
$this->loader->add_filter( 'wpmu_welcome_notification', $plugin_admin, 'disable_welcome_notification', 10, 5 );
|
|
|
116 |
$this->loader->add_filter( 'plugin_action_links', $plugin_admin, 'disable_plugin_deactivation', 10, 4 );
|
117 |
$this->loader->add_filter( 'plugin_action_links_' . WTLWP_PLUGIN_BASE_NAME, $plugin_admin, 'plugin_add_settings_link', 10, 4 );
|
|
|
|
|
|
|
|
|
118 |
}
|
119 |
|
120 |
/**
|
includes/feedback.php
CHANGED
@@ -39,4 +39,68 @@ if ( ! function_exists( 'tlwp_get_additional_info' ) ) {
|
|
39 |
|
40 |
}
|
41 |
|
42 |
-
add_filter( 'tlwp_additional_feedback_meta_info', 'tlwp_get_additional_info', 10, 2 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
}
|
41 |
|
42 |
+
add_filter( 'tlwp_additional_feedback_meta_info', 'tlwp_get_additional_info', 10, 2 );
|
43 |
+
|
44 |
+
if ( ! function_exists( 'tlwp_can_ask_user_for_review' ) ) {
|
45 |
+
/**
|
46 |
+
* Can we ask user for 5 star review?
|
47 |
+
*
|
48 |
+
* @return bool
|
49 |
+
*
|
50 |
+
* @since 1.5.22
|
51 |
+
*/
|
52 |
+
function tlwp_can_ask_user_for_review( $enable, $review_data ) {
|
53 |
+
|
54 |
+
if ( $enable ) {
|
55 |
+
|
56 |
+
$current_user_id = get_current_user_id();
|
57 |
+
|
58 |
+
// Don't show 5 star review notice to temporary user
|
59 |
+
if ( ! empty( $current_user_id ) && Wp_Temporary_Login_Without_Password_Common::is_valid_temporary_login( $current_user_id ) ) {
|
60 |
+
return false;
|
61 |
+
}
|
62 |
+
|
63 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
64 |
+
return false;
|
65 |
+
}
|
66 |
+
|
67 |
+
$temporary_logins = Wp_Temporary_Login_Without_Password_Common::get_temporary_logins();
|
68 |
+
$total_logins = count( $temporary_logins );
|
69 |
+
|
70 |
+
// Is user fall in love with our plugin in 60 days after they said no for the review?
|
71 |
+
// But, make sure we are asking user only after 60 days.
|
72 |
+
// We are good people. Respect the user decision.
|
73 |
+
if ( $total_logins < 1 ) {
|
74 |
+
return false;
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
return $enable;
|
79 |
+
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
add_filter( 'tlwp_can_ask_user_for_review', 'tlwp_can_ask_user_for_review', 10, 2 );
|
84 |
+
|
85 |
+
|
86 |
+
if ( ! function_exists( 'tlwp_review_message_data' ) ) {
|
87 |
+
/**
|
88 |
+
* Filter 5 star review data
|
89 |
+
*
|
90 |
+
* @param $review_data
|
91 |
+
*
|
92 |
+
* @return mixed
|
93 |
+
*
|
94 |
+
* @since 1.5.22
|
95 |
+
*/
|
96 |
+
function tlwp_review_message_data( $review_data ) {
|
97 |
+
|
98 |
+
$icon_url = WTLWP_PLUGIN_URL . 'admin/assets/images/icon-64.png';
|
99 |
+
|
100 |
+
$review_data['icon_url'] = $icon_url;
|
101 |
+
|
102 |
+
return $review_data;
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
add_filter( 'tlwp_review_message_data', 'tlwp_review_message_data', 10 );
|
includes/feedback/class-ig-feedback.php
CHANGED
@@ -4,22 +4,30 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
4 |
exit; // Exit if accessed directly.
|
5 |
}
|
6 |
|
7 |
-
if ( ! class_exists( '
|
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
|
15 |
-
* @
|
16 |
* @copyright Copyright (c) 2019, Icegram
|
17 |
* @license https://opensource.org/licenses/gpl-license GNU Public License
|
18 |
* @author Icegram
|
19 |
-
* @
|
20 |
*/
|
21 |
-
class
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
/**
|
24 |
* The API URL where we will send feedback data.
|
25 |
*
|
@@ -104,8 +112,229 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_10' ) ) {
|
|
104 |
|
105 |
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles' ) );
|
106 |
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
}
|
108 |
|
|
|
|
|
|
|
|
|
|
|
109 |
public function render_deactivate_feedback() {
|
110 |
add_action( 'admin_print_scripts', array( $this, 'js' ), 20 );
|
111 |
add_action( 'admin_print_scripts', array( $this, 'css' ) );
|
@@ -127,19 +356,19 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_10' ) ) {
|
|
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 |
|
@@ -152,7 +381,6 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_10' ) ) {
|
|
152 |
*
|
153 |
* @since 1.0.3
|
154 |
*/
|
155 |
-
|
156 |
public function prepare_widget_params( $params = array() ) {
|
157 |
|
158 |
$default_params = array(
|
@@ -176,6 +404,13 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_10' ) ) {
|
|
176 |
return $params;
|
177 |
}
|
178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
public function render_widget( $params = array() ) {
|
180 |
|
181 |
$params = $this->prepare_widget_params( $params );
|
@@ -729,7 +964,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_10' ) ) {
|
|
729 |
event.preventDefault();
|
730 |
loader(true);
|
731 |
if (!$form.find('input[type=radio]:checked').val()) {
|
732 |
-
$form.find('.ig-deactivate-survey-footer').prepend('<span class="error"><?php echo esc_js( __( 'Please select an option',
|
733 |
return;
|
734 |
}
|
735 |
|
@@ -924,34 +1159,34 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_10' ) ) {
|
|
924 |
|
925 |
$options = array(
|
926 |
1 => array(
|
927 |
-
'title' => esc_html__( 'I no longer need the plugin',
|
928 |
'slug' => 'i-no-longer-need-the-plugin'
|
929 |
),
|
930 |
2 => array(
|
931 |
-
'title' => esc_html__( 'I\'m switching to a different plugin',
|
932 |
'slug' => 'i-am-switching-to-a-different-plugin',
|
933 |
-
'details' => esc_html__( 'Please share which plugin',
|
934 |
),
|
935 |
3 => array(
|
936 |
-
'title' => esc_html__( 'I couldn\'t get the plugin to work',
|
937 |
'slug' => 'i-could-not-get-the-plugin-to-work'
|
938 |
),
|
939 |
4 => array(
|
940 |
-
'title' => esc_html__( 'It\'s a temporary deactivation',
|
941 |
'slug' => 'it-is-a-temporary-deactivation'
|
942 |
),
|
943 |
5 => array(
|
944 |
-
'title' => esc_html__( 'Other',
|
945 |
'slug' => 'other',
|
946 |
-
'details' => esc_html__( 'Please share the reason',
|
947 |
),
|
948 |
);
|
949 |
?>
|
950 |
<div class="ig-deactivate-survey-modal" id="ig-deactivate-survey-<?php echo $this->plugin; ?>">
|
951 |
<div class="ig-deactivate-survey-wrap">
|
952 |
<form class="ig-deactivate-survey" method="post">
|
953 |
-
<span class="ig-deactivate-survey-title"><span class="dashicons dashicons-testimonial"></span><?php echo ' ' . esc_html__( 'Quick Feedback',
|
954 |
-
<span class="ig-deactivate-survey-desc"><?php echo sprintf( esc_html__( 'If you have a moment, please share why you are deactivating %s:',
|
955 |
<div class="ig-deactivate-survey-options">
|
956 |
<?php foreach ( $options as $id => $option ) : ?>
|
957 |
<div class="ig-deactivate-survey-option">
|
@@ -974,9 +1209,9 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_10' ) ) {
|
|
974 |
<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; ?>"/>
|
975 |
</div>
|
976 |
<div class="ig-deactivate-survey-footer">
|
977 |
-
<button type="submit" class="ig-deactivate-survey-submit button button-primary button-large"><?php echo sprintf( esc_html__( 'Submit %s Deactivate',
|
978 |
<img class="ig-deactivate-survey-loader" id="ig-deactivate-survey-loader" src="<?php echo plugin_dir_url( __FILE__ ); ?>/assets/images/loading.gif"/>
|
979 |
-
<a href="#" class="ig-deactivate-survey-deactivate"><?php echo sprintf( esc_html__( 'Skip %s Deactivate',
|
980 |
</div>
|
981 |
</form>
|
982 |
</div>
|
4 |
exit; // Exit if accessed directly.
|
5 |
}
|
6 |
|
7 |
+
if ( ! class_exists( 'IG_Feedback_V_1_0_15' ) ) {
|
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_15
|
15 |
+
* @since 1.0.0
|
16 |
* @copyright Copyright (c) 2019, Icegram
|
17 |
* @license https://opensource.org/licenses/gpl-license GNU Public License
|
18 |
* @author Icegram
|
19 |
+
* @package feedback
|
20 |
*/
|
21 |
+
class IG_Feedback_V_1_0_15 {
|
22 |
|
23 |
+
/**
|
24 |
+
* Version of Feedback Library
|
25 |
+
*
|
26 |
+
* @since 1.0.13
|
27 |
+
* @var string
|
28 |
+
*
|
29 |
+
*/
|
30 |
+
public $version = '1.0.15';
|
31 |
/**
|
32 |
* The API URL where we will send feedback data.
|
33 |
*
|
112 |
|
113 |
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles' ) );
|
114 |
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Show 5 star review notice to user
|
118 |
+
*
|
119 |
+
* @since 1.0.12
|
120 |
+
*/
|
121 |
+
add_action( 'admin_notices', array( &$this, 'show_review_notice' ) );
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Ask for user review
|
126 |
+
*
|
127 |
+
* @since 1.0.12
|
128 |
+
*/
|
129 |
+
public function show_review_notice() {
|
130 |
+
|
131 |
+
if ( ! defined( 'DOING_AJAX' ) && is_admin() ) {
|
132 |
+
|
133 |
+
$enable_review_notice = apply_filters( $this->plugin_abbr . '_enable_review_notice', true );
|
134 |
+
|
135 |
+
$can_ask_user_for_review = true;
|
136 |
+
|
137 |
+
if ( $enable_review_notice ) {
|
138 |
+
|
139 |
+
$current_user_id = get_current_user_id();
|
140 |
+
|
141 |
+
$review_done_option = $this->plugin_abbr . '_feedback_review_done';
|
142 |
+
$no_bug_option = $this->plugin_abbr . '_feedback_do_not_ask_again';
|
143 |
+
$already_did_option = $this->plugin_abbr . '_feedback_already_did';
|
144 |
+
$maybe_later_option = $this->plugin_abbr . '_feedback_maybe_later';
|
145 |
+
$review_done_time_option = $review_done_option . '_time';
|
146 |
+
$no_bug_time_option = $no_bug_option . '_time';
|
147 |
+
$already_did_time_option = $already_did_option . '_time';
|
148 |
+
$maybe_later_time_option = $maybe_later_option . '_time';
|
149 |
+
|
150 |
+
$no_bug_days_before = 1;
|
151 |
+
$no_bug_value = get_user_meta( $current_user_id, $no_bug_option, true );
|
152 |
+
$no_bug_time_value = get_user_meta( $current_user_id, $no_bug_time_option, true );
|
153 |
+
|
154 |
+
$review_done_value = get_user_meta( $current_user_id, $review_done_option, true );
|
155 |
+
$review_done_time_value = get_user_meta( $current_user_id, $review_done_time_option, true );
|
156 |
+
|
157 |
+
if ( ! empty( $no_bug_time_value ) && 0 !== $no_bug_time_value ) {
|
158 |
+
$no_bug_time_diff = time() - $no_bug_time_value;
|
159 |
+
$no_bug_days_before = floor( $no_bug_time_diff / 86400 ); // 86400 seconds == 1 day
|
160 |
+
}
|
161 |
+
|
162 |
+
$already_did_value = get_user_meta( $current_user_id, $already_did_option, true );
|
163 |
+
$already_did_time_value = get_user_meta( $current_user_id, $already_did_time_option, true );
|
164 |
+
|
165 |
+
$maybe_later_days_before = 1;
|
166 |
+
$maybe_later_value = get_user_meta( $current_user_id, $maybe_later_option, true );
|
167 |
+
$maybe_later_time_value = get_user_meta( $current_user_id, $maybe_later_time_option, true );
|
168 |
+
|
169 |
+
if ( $maybe_later_value && ! empty( $maybe_later_time_value ) && 0 !== $maybe_later_time_value ) {
|
170 |
+
$maybe_later_time_diff = time() - $maybe_later_time_value;
|
171 |
+
$maybe_later_days_before = floor( $maybe_later_time_diff / 86400 ); // 86400 seconds == 1 day
|
172 |
+
}
|
173 |
+
|
174 |
+
// Is user fall in love with our plugin in 15 days after when they said may be later?
|
175 |
+
// But, make sure we are asking user only after 15 days.
|
176 |
+
// We are good people. Respect the user decision.
|
177 |
+
if ( $review_done_value || $no_bug_value || $already_did_value || ( $maybe_later_value && $maybe_later_days_before < 15 ) || $already_did_value ) {
|
178 |
+
$can_ask_user_for_review = false;
|
179 |
+
}
|
180 |
+
|
181 |
+
$review_data = array(
|
182 |
+
'review_done_value' => $review_done_value,
|
183 |
+
'review_done_time_value' => $review_done_time_value,
|
184 |
+
'no_bug_value' => $no_bug_value,
|
185 |
+
'no_bug_time_value' => $no_bug_time_value,
|
186 |
+
'maybe_later_value' => $maybe_later_value,
|
187 |
+
'maybe_later_time_value' => $maybe_later_time_value,
|
188 |
+
'already_did_value' => $already_did_value,
|
189 |
+
'already_did_time_value' => $already_did_time_value,
|
190 |
+
);
|
191 |
+
|
192 |
+
$can_ask_user_for_review = apply_filters( $this->plugin_abbr . '_can_ask_user_for_review', $can_ask_user_for_review, $review_data );
|
193 |
+
|
194 |
+
if ( $can_ask_user_for_review ) {
|
195 |
+
|
196 |
+
$current_page_url = "//" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
197 |
+
|
198 |
+
$got_feedback = false;
|
199 |
+
/************** Update Review Status ********************/
|
200 |
+
$nonce = ! empty( $_GET['ig_feedback_nonce'] ) ? esc_attr( wp_unslash( $_GET['ig_feedback_nonce'] ) ) : '';
|
201 |
+
$nonce_verified = wp_verify_nonce( $nonce, 'review' );
|
202 |
+
|
203 |
+
$action = '';
|
204 |
+
if ( $nonce_verified ) {
|
205 |
+
$action = ! empty( $_GET['ig_feedback_action'] ) ? esc_attr( wp_unslash( $_GET['ig_feedback_action'] ) ) : '';
|
206 |
+
|
207 |
+
if ( ! empty( $action ) && $this->is_valid_action( $action ) ) {
|
208 |
+
update_user_meta( $current_user_id, $action, 1 );
|
209 |
+
update_user_meta( $current_user_id, $action . "_time", time() );
|
210 |
+
|
211 |
+
// Got the review request?
|
212 |
+
// Redirect them to review page
|
213 |
+
if ( $action === $review_done_option ) {
|
214 |
+
|
215 |
+
$url = ! empty( $_GET['review_url'] ) ? $_GET['review_url'] : '';
|
216 |
+
|
217 |
+
if ( ! empty( $url ) ) {
|
218 |
+
?>
|
219 |
+
|
220 |
+
<meta http-equiv="refresh" content="0; url=<?php echo $url; ?>"/>
|
221 |
+
|
222 |
+
<?php
|
223 |
+
}
|
224 |
+
}
|
225 |
+
}
|
226 |
+
|
227 |
+
$got_feedback = true;
|
228 |
+
}
|
229 |
+
/************** Update Review Status (End) ********************/
|
230 |
+
|
231 |
+
if ( ! $got_feedback ) {
|
232 |
+
|
233 |
+
$review_url = "https://wordpress.org/support/plugin/{$this->plugin}/reviews/";
|
234 |
+
$icon_url = plugin_dir_url( __FILE__ ) . 'assets/images/icon-64.png';
|
235 |
+
$message = __( sprintf( "<span><p>We hope you're enjoying <b>%s</b> plugin! Could you please do us a BIG favor and give us a 5-star rating on WordPress to help us spread the word and boost our motivation?</p>", $this->name ), $this->plugin );
|
236 |
+
|
237 |
+
$message_data = array(
|
238 |
+
'review_url' => $review_url,
|
239 |
+
'icon_url' => $icon_url,
|
240 |
+
'message' => $message
|
241 |
+
);
|
242 |
+
|
243 |
+
$message_data = apply_filters( $this->plugin_abbr . '_review_message_data', $message_data );
|
244 |
+
|
245 |
+
$message = ! empty( $message_data['message'] ) ? $message_data['message'] : '';
|
246 |
+
$review_url = ! empty( $message_data['review_url'] ) ? $message_data['review_url'] : '';
|
247 |
+
$icon_url = ! empty( $message_data['icon_url'] ) ? $message_data['icon_url'] : '';
|
248 |
+
|
249 |
+
$nonce = wp_create_nonce( 'review' );
|
250 |
+
|
251 |
+
$review_url = add_query_arg( 'review_url', $review_url, add_query_arg( 'ig_feedback_nonce', $nonce, add_query_arg( 'ig_feedback_action', $review_done_option, $current_page_url ) ) );
|
252 |
+
$maybe_later_url = add_query_arg( 'ig_feedback_nonce', $nonce, add_query_arg( 'ig_feedback_action', $maybe_later_option, $current_page_url ) );
|
253 |
+
$already_did_url = add_query_arg( 'ig_feedback_nonce', $nonce, add_query_arg( 'ig_feedback_action', $already_did_option, $current_page_url ) );
|
254 |
+
$no_bug_url = add_query_arg( 'ig_feedback_nonce', $nonce, add_query_arg( 'ig_feedback_action', $no_bug_option, $current_page_url ) );
|
255 |
+
|
256 |
+
?>
|
257 |
+
|
258 |
+
<style type="text/css">
|
259 |
+
|
260 |
+
.ig-feedback-notice-links li {
|
261 |
+
display: inline-block;
|
262 |
+
margin-right: 15px;
|
263 |
+
}
|
264 |
+
|
265 |
+
.ig-feedback-notice-links li a {
|
266 |
+
display: inline-block;
|
267 |
+
color: #10738b;
|
268 |
+
text-decoration: none;
|
269 |
+
padding-left: 26px;
|
270 |
+
position: relative;
|
271 |
+
}
|
272 |
+
|
273 |
+
.ig-feedback-notice {
|
274 |
+
display: flex;
|
275 |
+
align-items: center;
|
276 |
+
}
|
277 |
+
|
278 |
+
.ig-feedback-plugin-icon {
|
279 |
+
style =
|
280 |
+
float: left;
|
281 |
+
margin-right: 0.5em;
|
282 |
+
}
|
283 |
+
|
284 |
+
</style>
|
285 |
+
|
286 |
+
<?php
|
287 |
+
|
288 |
+
echo '<div class="notice notice-success ig-feedback-notice">';
|
289 |
+
echo '<span class="ig-feedback-plugin-icon"> <img src="' . $icon_url . '" alt="Logo"/></span>';
|
290 |
+
echo $message;
|
291 |
+
echo "<ul class='ig-feedback-notice-links'>";
|
292 |
+
echo sprintf( '<li><a href="%s" class="button-primary" target="_blank" data-rated="' . esc_attr__( "Thank You :) ",
|
293 |
+
$this->plugin ) . '"><span class="dashicons dashicons-external"></span> Ok, you deserve it</a></li> <li><a href="%s"><span class="dashicons dashicons-calendar-alt"></span> Maybe later</a></li><li><a href="%s"><span class="dashicons dashicons-smiley"></span> I already did!</a></li><li><a href="%s"><span class="dashicons dashicons-no"></span> Don\'t ask me again</a></li>',
|
294 |
+
esc_url( $review_url ), esc_url( $maybe_later_url ), esc_url( $already_did_url ), esc_url( $no_bug_url ) );
|
295 |
+
echo "</ul></span>";
|
296 |
+
echo '</div>';
|
297 |
+
}
|
298 |
+
}
|
299 |
+
}
|
300 |
+
}
|
301 |
+
}
|
302 |
+
|
303 |
+
/**
|
304 |
+
* Is valid action?
|
305 |
+
*
|
306 |
+
* @param string $action
|
307 |
+
*
|
308 |
+
* @return bool
|
309 |
+
*
|
310 |
+
* @since 1.0.14
|
311 |
+
*/
|
312 |
+
public function is_valid_action( $action = '' ) {
|
313 |
+
if ( empty( $action ) ) {
|
314 |
+
return false;
|
315 |
+
}
|
316 |
+
|
317 |
+
$available_actions = array(
|
318 |
+
'_feedback_review_done',
|
319 |
+
'_feedback_already_did',
|
320 |
+
'_feedback_maybe_later',
|
321 |
+
'_feedback_do_not_ask_again',
|
322 |
+
);
|
323 |
+
|
324 |
+
foreach ( $available_actions as $available_action ) {
|
325 |
+
if ( strpos( $action, $available_action ) !== false ) {
|
326 |
+
return true;
|
327 |
+
}
|
328 |
+
}
|
329 |
+
|
330 |
+
return false;
|
331 |
}
|
332 |
|
333 |
+
/**
|
334 |
+
* Render Deactivation Feedback
|
335 |
+
*
|
336 |
+
* @since 1.0.0
|
337 |
+
*/
|
338 |
public function render_deactivate_feedback() {
|
339 |
add_action( 'admin_print_scripts', array( $this, 'js' ), 20 );
|
340 |
add_action( 'admin_print_scripts', array( $this, 'css' ) );
|
356 |
* @since 1.0.1
|
357 |
*/
|
358 |
public function enqueue_styles() {
|
359 |
+
wp_register_style( 'sweetalert', plugin_dir_url( __FILE__ ) . 'assets/css/sweetalert2.min.css', array(), $this->version );
|
360 |
wp_enqueue_style( 'sweetalert' );
|
361 |
|
362 |
+
wp_register_style( 'animate', plugin_dir_url( __FILE__ ) . 'assets/css/animate.min.css', array(), $this->version );
|
363 |
wp_enqueue_style( 'animate' );
|
364 |
|
365 |
+
wp_register_style( 'ig-feedback-star-rating', plugin_dir_url( __FILE__ ) . 'assets/css/star-rating.min.css', array(), $this->version );
|
366 |
wp_enqueue_style( 'ig-feedback-star-rating' );
|
367 |
|
368 |
+
wp_register_style( 'ig-feedback-emoji', plugin_dir_url( __FILE__ ) . 'assets/css/emoji.min.css', array(), $this->version );
|
369 |
wp_enqueue_style( 'ig-feedback-emoji' );
|
370 |
|
371 |
+
wp_register_style( 'ig-feedback', plugin_dir_url( __FILE__ ) . 'assets/css/feedback.min.css', array(), $this->version );
|
372 |
wp_enqueue_style( 'ig-feedback' );
|
373 |
}
|
374 |
|
381 |
*
|
382 |
* @since 1.0.3
|
383 |
*/
|
|
|
384 |
public function prepare_widget_params( $params = array() ) {
|
385 |
|
386 |
$default_params = array(
|
404 |
return $params;
|
405 |
}
|
406 |
|
407 |
+
/**
|
408 |
+
* Render Widget
|
409 |
+
*
|
410 |
+
* @param array $params
|
411 |
+
*
|
412 |
+
* @since 1.0.0
|
413 |
+
*/
|
414 |
public function render_widget( $params = array() ) {
|
415 |
|
416 |
$params = $this->prepare_widget_params( $params );
|
964 |
event.preventDefault();
|
965 |
loader(true);
|
966 |
if (!$form.find('input[type=radio]:checked').val()) {
|
967 |
+
$form.find('.ig-deactivate-survey-footer').prepend('<span class="error"><?php echo esc_js( __( 'Please select an option', $this->plugin ) ); ?></span>');
|
968 |
return;
|
969 |
}
|
970 |
|
1159 |
|
1160 |
$options = array(
|
1161 |
1 => array(
|
1162 |
+
'title' => esc_html__( 'I no longer need the plugin', $this->plugin ),
|
1163 |
'slug' => 'i-no-longer-need-the-plugin'
|
1164 |
),
|
1165 |
2 => array(
|
1166 |
+
'title' => esc_html__( 'I\'m switching to a different plugin', $this->plugin ),
|
1167 |
'slug' => 'i-am-switching-to-a-different-plugin',
|
1168 |
+
'details' => esc_html__( 'Please share which plugin', $this->plugin ),
|
1169 |
),
|
1170 |
3 => array(
|
1171 |
+
'title' => esc_html__( 'I couldn\'t get the plugin to work', $this->plugin ),
|
1172 |
'slug' => 'i-could-not-get-the-plugin-to-work'
|
1173 |
),
|
1174 |
4 => array(
|
1175 |
+
'title' => esc_html__( 'It\'s a temporary deactivation', $this->plugin ),
|
1176 |
'slug' => 'it-is-a-temporary-deactivation'
|
1177 |
),
|
1178 |
5 => array(
|
1179 |
+
'title' => esc_html__( 'Other', $this->plugin ),
|
1180 |
'slug' => 'other',
|
1181 |
+
'details' => esc_html__( 'Please share the reason', $this->plugin ),
|
1182 |
),
|
1183 |
);
|
1184 |
?>
|
1185 |
<div class="ig-deactivate-survey-modal" id="ig-deactivate-survey-<?php echo $this->plugin; ?>">
|
1186 |
<div class="ig-deactivate-survey-wrap">
|
1187 |
<form class="ig-deactivate-survey" method="post">
|
1188 |
+
<span class="ig-deactivate-survey-title"><span class="dashicons dashicons-testimonial"></span><?php echo ' ' . esc_html__( 'Quick Feedback', $this->plugin ); ?></span>
|
1189 |
+
<span class="ig-deactivate-survey-desc"><?php echo sprintf( esc_html__( 'If you have a moment, please share why you are deactivating %s:', $this->plugin ), $this->name ); ?></span>
|
1190 |
<div class="ig-deactivate-survey-options">
|
1191 |
<?php foreach ( $options as $id => $option ) : ?>
|
1192 |
<div class="ig-deactivate-survey-option">
|
1209 |
<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; ?>"/>
|
1210 |
</div>
|
1211 |
<div class="ig-deactivate-survey-footer">
|
1212 |
+
<button type="submit" class="ig-deactivate-survey-submit button button-primary button-large"><?php echo sprintf( esc_html__( 'Submit %s Deactivate', $this->plugin ), '&' ); ?></button>
|
1213 |
<img class="ig-deactivate-survey-loader" id="ig-deactivate-survey-loader" src="<?php echo plugin_dir_url( __FILE__ ); ?>/assets/images/loading.gif"/>
|
1214 |
+
<a href="#" class="ig-deactivate-survey-deactivate"><?php echo sprintf( esc_html__( 'Skip %s Deactivate', $this->plugin ), '&' ); ?></a>
|
1215 |
</div>
|
1216 |
</form>
|
1217 |
</div>
|
includes/feedback/class-ig-tracker.php
CHANGED
@@ -4,23 +4,23 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
4 |
exit; // Exit if accessed directly.
|
5 |
}
|
6 |
|
7 |
-
if ( ! class_exists( '
|
8 |
|
9 |
/**
|
10 |
-
* Class
|
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
|
16 |
-
* @
|
|
|
17 |
* @copyright Copyright (c) 2019, Icegram
|
18 |
* @license https://opensource.org/licenses/gpl-license GNU Public License
|
19 |
* @author Icegram
|
20 |
-
* @
|
21 |
-
*
|
22 |
*/
|
23 |
-
class
|
24 |
|
25 |
/**
|
26 |
* Get Active, Inactive or all plugins info
|
@@ -53,9 +53,11 @@ if ( ! class_exists( 'IG_Tracker_V_1_0_10' ) ) {
|
|
53 |
foreach ( $all_plugins as $plugin_path => $plugin ) {
|
54 |
// If the plugin isn't active, don't show it.
|
55 |
if ( in_array( $plugin_path, $active_plugins ) ) {
|
56 |
-
$slug
|
|
|
57 |
} else {
|
58 |
-
$slug
|
|
|
59 |
}
|
60 |
|
61 |
if ( $details ) {
|
@@ -65,7 +67,8 @@ if ( ! class_exists( 'IG_Tracker_V_1_0_10' ) ) {
|
|
65 |
'version' => $plugin['Version'],
|
66 |
'author' => $plugin['Author'],
|
67 |
'author_uri' => $plugin['AuthorURI'],
|
68 |
-
'plugin_uri' => $plugin['PluginURI']
|
|
|
69 |
);
|
70 |
|
71 |
$plugins[ $slug ][ $plugin_path ] = $plugin_data;
|
4 |
exit; // Exit if accessed directly.
|
5 |
}
|
6 |
|
7 |
+
if ( ! class_exists( 'IG_Tracker_V_1_0_15' ) ) {
|
8 |
|
9 |
/**
|
10 |
+
* Class IG_Tracker_V_1_0_15
|
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_15
|
16 |
+
* @since 1.0.0
|
17 |
+
*
|
18 |
* @copyright Copyright (c) 2019, Icegram
|
19 |
* @license https://opensource.org/licenses/gpl-license GNU Public License
|
20 |
* @author Icegram
|
21 |
+
* @package feedback
|
|
|
22 |
*/
|
23 |
+
class IG_Tracker_V_1_0_15 {
|
24 |
|
25 |
/**
|
26 |
* Get Active, Inactive or all plugins info
|
53 |
foreach ( $all_plugins as $plugin_path => $plugin ) {
|
54 |
// If the plugin isn't active, don't show it.
|
55 |
if ( in_array( $plugin_path, $active_plugins ) ) {
|
56 |
+
$slug = 'active_plugins';
|
57 |
+
$is_active = 1;
|
58 |
} else {
|
59 |
+
$slug = 'inactive_plugins';
|
60 |
+
$is_active = 0;
|
61 |
}
|
62 |
|
63 |
if ( $details ) {
|
67 |
'version' => $plugin['Version'],
|
68 |
'author' => $plugin['Author'],
|
69 |
'author_uri' => $plugin['AuthorURI'],
|
70 |
+
'plugin_uri' => $plugin['PluginURI'],
|
71 |
+
'is_active' => $is_active
|
72 |
);
|
73 |
|
74 |
$plugins[ $slug ][ $plugin_path ] = $plugin_data;
|
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=BMFRMVXQ87JWA&source=url
|
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
|
7 |
-
Stable tag: 1.5.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -78,6 +78,9 @@ No. at this moment it's not possible to do this.
|
|
78 |
|
79 |
== Changelog ==
|
80 |
|
|
|
|
|
|
|
81 |
**1.5.21 [2019-11-04]**
|
82 |
* Update: Make it compatible with iThemes Security (formerly Better WP Security) plugin with Custom URL Login enabled
|
83 |
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BMFRMVXQ87JWA&source=url
|
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.3.2
|
7 |
+
Stable tag: 1.5.22
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
78 |
|
79 |
== Changelog ==
|
80 |
|
81 |
+
**1.5.22 [2019-12-23]**
|
82 |
+
* Update: Compatibility test with WordPress 5.3.2
|
83 |
+
|
84 |
**1.5.21 [2019-11-04]**
|
85 |
* Update: Make it compatible with iThemes Security (formerly Better WP Security) plugin with Custom URL Login enabled
|
86 |
|
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.
|
7 |
* Author: StoreApps
|
8 |
* Author URI: https://storeapps.org
|
9 |
* Requires at least: 3.0.1
|
10 |
-
* Tested up to: 5.2
|
11 |
* License: GPLv3
|
12 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
13 |
* Text Domain: temporary-login-without-password
|
@@ -25,10 +25,11 @@ if ( ! defined( 'WPINC' ) ) {
|
|
25 |
/**
|
26 |
* Define constants
|
27 |
*/
|
|
|
|
|
28 |
define( 'WTLWP_PLUGIN_DIR', dirname( __FILE__ ) );
|
29 |
-
define( 'WTLWP_PLUGIN_VERSION', '1.5.21' );
|
30 |
define( 'WTLWP_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );
|
31 |
-
define( '
|
32 |
|
33 |
/**
|
34 |
* 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.22
|
7 |
* Author: StoreApps
|
8 |
* Author URI: https://storeapps.org
|
9 |
* Requires at least: 3.0.1
|
10 |
+
* Tested up to: 5.3.2
|
11 |
* License: GPLv3
|
12 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
13 |
* Text Domain: temporary-login-without-password
|
25 |
/**
|
26 |
* Define constants
|
27 |
*/
|
28 |
+
define( 'WTLWP_PLUGIN_VERSION', '1.5.22' );
|
29 |
+
define( 'WTLWP_FEEDBACK_VERSION', '1.0.15' );
|
30 |
define( 'WTLWP_PLUGIN_DIR', dirname( __FILE__ ) );
|
|
|
31 |
define( 'WTLWP_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );
|
32 |
+
define( 'WTLWP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
33 |
|
34 |
/**
|
35 |
* Deactivate Temporary Login Without Password
|