Yet Another Related Posts Plugin (YARPP) - Version 5.1.4

Version Description

(2020-05-11) = * Require PHP 5.3 as a bare minimum for compatibility features * New: Display optional feedback form on plugin deactivation

Download this release

Release Info

Developer jeffparker
Plugin Icon 128x128 Yet Another Related Posts Plugin (YARPP)
Version 5.1.4
Comparing to
See all releases

Code changes from version 5.1.3 to 5.1.4

classes/YARPP_Admin.php CHANGED
@@ -34,6 +34,7 @@ class YARPP_Admin {
34
add_filter('current_screen', array($this, 'settings_screen'));
35
add_filter('screen_settings', array($this, 'render_screen_settings'), 10, 2);
36
add_filter('default_hidden_meta_boxes', array($this, 'default_hidden_meta_boxes'), 10, 2);
37
}
38
39
/**
@@ -760,4 +761,82 @@ class YARPP_Admin {
760
echo 'ok';
761
die();
762
}
763
}
34
add_filter('current_screen', array($this, 'settings_screen'));
35
add_filter('screen_settings', array($this, 'render_screen_settings'), 10, 2);
36
add_filter('default_hidden_meta_boxes', array($this, 'default_hidden_meta_boxes'), 10, 2);
37
+ add_filter('shareaholic_deactivate_feedback_form_plugins', array($this,'deactivation_survey_data'));
38
}
39
40
/**
761
echo 'ok';
762
die();
763
}
764
+
765
+ /**
766
+ * Registers YARPP plugin for the deactivation survey library code.
767
+ *
768
+ * @param array $plugins
769
+ *
770
+ * @return array
771
+ */
772
+ public function deactivation_survey_data( $plugins ) {
773
+
774
+ global $yarpp;
775
+ if ( $yarpp instanceof YARPP && isset( $yarpp->cloud ) && $yarpp->cloud instanceof YARPP_Cloud ) {
776
+ $api_key = $yarpp->cloud->get_api_key();
777
+ $verification_key = $yarpp->cloud->get_option( 'verification_key' );
778
+ if ( empty( $verification_key ) ) {
779
+ $verification_key = '';
780
+ }
781
+ } else {
782
+ $api_key = '';
783
+ $verification_key = '';
784
+ }
785
+
786
+
787
+ $plugins[] = (object) array(
788
+ 'basename' => plugin_basename(YARPP_MAIN_FILE),
789
+ 'logo' => YARPP_URL . '/images/icon-256x256.png',
790
+ 'api_server' => 'yarpp.com',
791
+ 'bgcolor' => '#fff',
792
+ 'send' => array(
793
+ 'plugin_name' => 'yarpp',
794
+ 'plugin_version' => YARPP_VERSION,
795
+ 'api_key' => $api_key,
796
+ 'verification_key' => $verification_key,
797
+ 'platform' => 'wordpress',
798
+ 'domain' => site_url(),
799
+ 'language' => strtolower( get_bloginfo( 'language' ) ),
800
+ ),
801
+ 'reasons' => array(
802
+ 'error' => esc_html__( 'I think I found a bug', 'yarpp' ),
803
+ 'feature-missing' => esc_html__( 'It\'s missing a feature I need', 'yarpp' ),
804
+ 'too-hard' => esc_html__( 'I couldn\'t figure out how to do something', 'yarpp' ),
805
+ 'inefficient' => esc_html__( 'It\'s too slow or inefficient', 'yarpp' ),
806
+ 'no-signup' => esc_html__( 'I don\'t want to signup', 'yarpp' ),
807
+ 'temporary-deactivation' => esc_html__( 'Temporarily deactivating or troubleshooting', 'yarpp' ),
808
+ 'other' => esc_html__( 'Other', 'yarpp' )
809
+ ),
810
+ 'reasons_needing_comment' => array(
811
+ 'error',
812
+ 'feature-missing',
813
+ 'too-hard',
814
+ 'other'
815
+ ),
816
+ 'translations' => array(
817
+ 'quick_feedback' => esc_html__( 'Quick Feedback', 'yarpp' ),
818
+ 'foreword' => esc_html__( 'If you would be kind enough, please tell us why you are deactivating the plugin:',
819
+ 'yarpp' ),
820
+ 'please_tell_us' => esc_html__( 'Please share anything you think might be helpful. The more we know about your problem, the faster we\'ll be able to fix it.',
821
+ 'yarpp' ),
822
+ 'cancel' => esc_html__( 'Cancel', 'yarpp' ),
823
+ 'skip_and_deactivate' => esc_html__( 'Skip & Deactivate', 'yarpp' ),
824
+ 'submit_and_deactivate' => esc_html__( 'Submit & Deactivate', 'yarpp' ),
825
+ 'please_wait' => esc_html__( 'Please wait...', 'yarpp' ),
826
+ 'thank_you' => esc_html__( 'Thank you!', 'yarpp' ),
827
+ 'ask_for_support' => sprintf(
828
+ esc_html__( 'Just so you know, you can visit %1$sthe support forum%2$s or %3$sread the FAQs%2$s for help.',
829
+ 'yarpp' ),
830
+ '<a href="https://wordpress.org/support/plugin/yet-another-related-posts-plugin/" target="_blank" >',
831
+ '</a>',
832
+ '<a href="https://wordpress.org/plugins/yet-another-related-posts-plugin/#faq" target="_blank" >'
833
+ ),
834
+ 'email_request' => esc_html__( 'If you would like to tell us more, please leave your email here. We will be in touch (only for product feedback, nothing else).',
835
+ 'yarpp' ),
836
+ )
837
+
838
+ );
839
+
840
+ return $plugins;
841
+ }
842
}
classes/YARPP_Core.php CHANGED
@@ -1490,7 +1490,7 @@ class YARPP {
1490
$version = YARPP_VERSION;
1491
$remote = wp_remote_post("https://yarpp.org/checkversion.php?format=php&version={$version}");
1492
1493
- if (is_wp_error($remote) || wp_remote_retrieve_response_code($remote) != 200 || !isset($remote['body'])){
1494
$this->set_transient('yarpp_version_info', null, 60*60);
1495
return false;
1496
}
1490
$version = YARPP_VERSION;
1491
$remote = wp_remote_post("https://yarpp.org/checkversion.php?format=php&version={$version}");
1492
1493
+ if (is_wp_error($remote) || wp_remote_retrieve_response_code($remote) != 200 || !isset($remote['body']) || !is_array($remote['body'])){
1494
$this->set_transient('yarpp_version_info', null, 60*60);
1495
return false;
1496
}
images/yarpp-icon.svg ADDED
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="145px" height="191px" viewBox="0 0 145 191" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>mark</title>
4
+ <defs></defs>
5
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
6
+ <g id="mark" transform="translate(1.000000, 0.000000)" fill="#000000" fill-rule="nonzero">
7
+ <g id="coffee" transform="translate(71.500000, 120.703704) scale(-1, 1) rotate(-180.000000) translate(-71.500000, -120.703704) translate(0.000000, 51.703704)">
8
+ <path d="M42.8605706,136.08228 C32.8383705,134.783388 25.4669697,132.899997 20.7463681,130.432103 L17.3693225,127.801849 L17.6961333,113.286738 C17.9140072,99.3561292 17.9140072,98.6742113 15.626331,96.8232912 C9.85267229,92.1472827 0,79.2639855 0,68.5481325 C0,63.190206 1.55910743,60.0622836 4.82721619,54.4121066 C7.00595535,50.8076833 13.5249703,45.5370334 14.7232769,44.5628649 C17.0109529,43.0041953 18.4586919,44.1303138 17.6961333,33.1222102 C16.8246376,19.386435 16.0620789,17.4285621 24.0144768,12.8499703 C34.7992358,6.61529219 42.7516337,3.59536997 52.7738339,1.7444499 C76.6310277,-2.44447446 113.342783,1.25736568 126.30628,9.14813017 C133.931868,13.9215556 136.546355,16.844061 136.546355,20.9355684 C140.468085,87.8934137 142.537888,121.85942 142.755761,122.833589 C143.191509,125.074177 142.755761,125.658677 139.160842,127.314764 C134.040804,129.652769 127.831398,130.821771 106.588691,133.354609 C97.6558607,134.426194 87.0889758,135.692613 83.1672452,136.277114 C74.5612255,137.446116 52.55596,137.348699 42.8605706,136.08228 Z M84.5302734,132.078704 C90.2338167,131.384856 99.0983213,130.250086 109.038086,129.19345 C123.269589,127.025504 135.419901,125.626331 136.052413,123.330859 C136.26325,122.693228 123.934295,120.974239 120.350064,119.826503 C114.130371,117.786084 102.282696,120.185881 90.3749197,122.413563 C78.5049292,124.634175 65.4563408,123.330859 57.2545987,123.330859 C57.2545987,123.330859 52.4754466,122.523193 42.9171425,120.907861 C34.8760316,119.548931 36.2210561,119.122494 30.0013622,121.800545 C26.4171319,123.458385 23.2545757,125.243752 23.1491572,126.00891 C23.1491572,126.646541 23.4436238,128.461522 26.4171319,129.962221 C30.7587891,132.153411 43.5141602,132.441008 54.7143555,132.987395 C63.4858398,132.987395 78.8267301,132.772551 84.5302734,132.078704 Z M39.8706761,116.766844 C44.1268856,115.725876 53.6774041,114.21174 61.1517228,113.360038 C78.7994201,111.372734 134.960621,119.511215 135.168241,119.227315 C135.375861,119.038049 134.441571,54.1194625 131.327272,29.7040177 C129.873932,18.9157978 129.354882,17.9694627 122.088183,13.4270544 C110.461465,6.04564084 74.5432107,2.73346808 53.365974,6.9919759 C42.9849757,9.07391307 36.7563767,11.7236513 27.4134781,17.6855623 L22.2811694,21.5880854 L23.5725088,121.309253 L39.8706761,116.766844 Z M17.5997043,65.8013821 C17.5997043,50.8200023 18.1706592,50.7529753 17.5997043,50.7529753 C14.2258377,50.7529753 10.6869946,53.2086296 7.93345172,57.6428564 C5.8104668,61.0616507 5.50346166,65.6301628 5.50346166,67.2280714 C5.50346166,78.0260213 10.8676018,86.5101525 17.5997043,86.5101525 C17.5997043,86.5101525 17.5997043,79.607229 17.5997043,65.8013821 Z" id="mug" stroke="#000000"></path>
9
+ <g id="Face" transform="translate(50.942850, 60.400797)">
10
+ <path d="M62.160778,33.5475835 C58.4082262,26.6041533 60.1139316,19.0295022 64.8899066,19.0295022 C67.6190353,19.0295022 70.6893049,21.554386 71.7127282,24.7104906 C74.1007157,31.0226999 65.2310478,39.2285718 62.160778,33.5475835 Z" id="Shape"></path>
11
+ <path d="M2.10303837,34.0061906 C-1.64951349,27.0627603 0.0561919019,19.4881092 4.832167,19.4881092 C7.56129563,19.4881092 10.6315653,22.0129929 11.6549885,25.1690976 C14.0429761,31.4813068 5.17330808,39.6871789 2.10303837,34.0061906 Z" id="Shape"></path>
12
+ <path d="M31.2744481,13.4867788 C22.3526728,9.75718844 22.3526728,6.85639597 31.6992946,2.91960618 C42.1080324,-1.22438307 54.6410025,-0.809984147 59.1018902,3.74840403 C62.2882385,7.47799435 62.2882385,7.89239328 58.8894669,10.7931858 C53.1540399,15.7659729 39.3465305,17.0091696 31.2744481,13.4867788 Z M34.976751,7.90748093 C31.9007499,10.1104937 36.6921961,10.3294258 44.7947408,9.91788078 C56.0107659,9.20199741 56.1391309,4.42943021 44.7105432,4.91244623 C39.9559268,5.04429429 35.7457513,7.35672775 34.976751,7.90748093 Z" id="Shape"></path>
13
+ </g>
14
+ </g>
15
+ <g id="Steam" transform="translate(59.000000, 0.000000)">
16
+ <path d="M4.16072763,0 C3.8378459,2.63060705 3.63689662,5.30305159 3.55986302,7.99095841 C3.50399,11.7470679 4.34571573,15.3721626 5.88012483,17.9837251 C6.89080993,19.79566 7.8953323,21.6238698 8.89369196,23.4683544 C9.94816663,25.3544895 10.6511261,27.7615875 10.9088994,30.3688969 C11.2199644,33.5056623 10.7257443,36.7238795 9.55926508,39.1573237 C8.32730672,41.7867086 6.67010618,43.6939485 4.8078126,44.6256781 L4.16072763,45 C4.54897862,43.79566 4.91874145,42.6889692 5.26077208,41.5660036 C5.72297563,40.0524412 6.18517917,38.5388789 6.61040644,36.9764919 C7.10981843,35.2326056 7.05009434,33.1543735 6.45325723,31.5081374 C6.2293797,30.9214149 5.97231446,30.3761351 5.68599934,29.880651 C4.66915153,28.0415914 3.62457152,26.2676311 2.63545592,24.4122966 C1.45178454,22.2681987 0.62382925,19.5948547 0.241241542,16.681736 C-0.438989396,11.7709757 0.340504342,6.58788172 2.31191343,2.91320073 C2.76487291,2.01808319 3.30102903,1.28571429 3.80020887,0.455696202 L4.06828692,5.05924416e-15 L4.16072763,0 Z" id="Shape"></path>
17
+ <path d="M42,22.2784335 C41.5087566,23.247748 41.0367776,24.1755205 40.5551664,25.1586823 C40.1845249,25.9527384 39.8622545,26.7913079 39.591944,27.6650528 C39.2956943,28.8926755 39.2292571,30.2107229 39.3992994,31.4869214 C39.5437829,33.4255504 39.7267951,35.3641795 39.8038529,37.3028085 C39.8563132,38.9567993 39.5167155,40.587414 38.8406305,41.9278235 C38.0105027,43.6950754 36.6602155,44.8138092 35.1803853,44.9603932 C33.720005,45.1484608 32.2558855,44.6634774 31,43.5756581 L31.1348511,43.4094899 C32.0980736,42.4955649 33.1287215,41.5954871 34.1015762,40.6400199 C34.7603771,40.0681104 35.0780935,38.9403296 34.8817863,37.8705499 C34.5399208,35.5070657 34.3752325,33.0977166 34.390543,30.683775 C34.5530247,26.3626272 36.7924318,22.7913004 39.765324,22.1122653 C40.4194081,21.9625782 41.0858457,21.9625782 41.7399299,22.1122653 L41.8844134,22.1122653 L42,22.2784335 Z" id="Shape"></path>
18
+ </g>
19
+ </g>
20
+ </g>
21
+ </svg>
lib/plugin-deactivation-survey/deactivate-feedback-form.css ADDED
@@ -0,0 +1,102 @@
1
+ .wp-admin .remodal {
2
+ margin-top: 20px;
3
+ }
4
+
5
+ .shareaholic-deactivate-dialog {
6
+ text-align: left;
7
+ width: auto;
8
+ }
9
+
10
+ .shareaholic-deactivate-dialog {
11
+ width: auto !important;
12
+ }
13
+
14
+ .shareaholic-deactivate-dialog input[name="comments"] {
15
+ width: 380px;
16
+ }
17
+
18
+ .shareaholic-deactivate-header {
19
+ background-size: contain;
20
+ background-repeat: no-repeat;
21
+ position: absolute;
22
+ top: 0px;
23
+ left: 0px;
24
+ width: 100%;
25
+ align-items: center;
26
+ max-height: 65px;
27
+ box-shadow: 0 0 8px rgba(0,0,0,.1);
28
+ -webkit-box-shadow: 0 0 8px rgba(0,0,0,.1);
29
+ }
30
+
31
+ .shareaholic-review-notice-text {
32
+ background: rgba(255, 255, 255, 0.9);
33
+ text-shadow: #fff 0px 0px 10px;
34
+ margin-right: 8em !important;
35
+ }
36
+
37
+ .shareaholic-deactivate-header h2 {
38
+ font-size: 15px;
39
+ font-weight: 700;
40
+ line-height: 1.4;
41
+ color: #495157;
42
+ text-transform: uppercase;
43
+ margin-left: 65px;
44
+ }
45
+
46
+ .shareaholic-deactivate-body {
47
+ margin-top: 50px;
48
+ }
49
+
50
+ .shareaholic-deactivate-body-foreword {
51
+ font-size: 15px;
52
+ font-weight: 700;
53
+ line-height: 1.6em;
54
+ color: #495157;
55
+ margin-bottom: 1.6em;
56
+ }
57
+
58
+ .shareaholic-deactivate-text-area {
59
+ text-align: left;
60
+ vertical-align: middle;
61
+ transition-property: all;
62
+ transition-duration: 0.15s;
63
+ transition-timing-function: ease-out;
64
+ transition-delay: 0s;
65
+ }
66
+
67
+ .shareaholic-deactivate-input, .shareaholic-deactivate-input[type], .shareaholic-deactivate-text-area {
68
+ font-size: 12px;
69
+ border-radius: 3px;
70
+ border: 1px solid #cbd6e2;
71
+ background-color: #f5f8fa;
72
+ margin-top: 1.2em;
73
+ padding: 9px 10px;
74
+ width: 100%;
75
+ }
76
+
77
+ .shareaholic-deactivate-help {
78
+ font-size: 0.9em;
79
+ color: #71767c;
80
+ margin: 0.6em 0 2em 0;
81
+ }
82
+
83
+ .shareaholic-deactivate-reasons li {
84
+ margin: 1em 0 1.2em 0;
85
+ color: #33475b;
86
+ }
87
+
88
+ .shareaholic-deactivate-contact {
89
+ font-weight: 700;
90
+ line-height: 1.6em;
91
+ margin-top: 2em;
92
+ }
93
+
94
+ .shareaholic-deactivate-divider {
95
+ border-top: 1px #ddd solid;
96
+ margin: 2.6em -30px 20px -30px;
97
+ }
98
+
99
+ .shareaholic-deactivate-dialog-footer {
100
+ text-align: right;
101
+ padding: 0 0 20px 0;
102
+ }
lib/plugin-deactivation-survey/deactivate-feedback-form.js ADDED
@@ -0,0 +1,170 @@
1
+ (function($) {
2
+
3
+ if(!window.shareaholic)
4
+ window.shareaholic = {};
5
+
6
+ if(shareaholic.DeactivateFeedbackForm)
7
+ return;
8
+
9
+ shareaholic.DeactivateFeedbackForm = function(plugin)
10
+ {
11
+ var self = this;
12
+ var strings = shareaholic_deactivate_feedback_form_strings;
13
+
14
+ this.plugin = plugin;
15
+
16
+ // Dialog HTML
17
+ var element = $('\
18
+ <div id="shareaholic-deactivate-dialog" class="shareaholic-deactivate-dialog" data-remodal-id="' + plugin.basename + '">\
19
+ <div class="shareaholic-deactivate-header" style="background-image: url(' + plugin.logo + '); background-color: ' + plugin.bgcolor + ';"><div class="shareaholic-deactivate-text"><h2>' + strings.quick_feedback + '</h2></div></div>\
20
+ <div class="shareaholic-deactivate-body">\
21
+ <form>\
22
+ <input type="hidden" name="plugin"/>\
23
+ <div class="shareaholic-deactivate-body-foreword">\
24
+ ' + strings.foreword + '\
25
+ </div>\
26
+ <ul class="shareaholic-deactivate-reasons"></ul>\
27
+ <div style="display:none;" id="shareaholic-deactivate-comment-area">\
28
+ <textarea class="shareaholic-deactivate-text-area" name="comment" rows="3" id="shareaholic-deactivate-comment" placeholder="' + strings.please_tell_us + '"/></textarea>\
29
+ <p class="shareaholic-deactivate-help">' + strings.ask_for_support + '</p>\
30
+ </div>\
31
+ <div class="shareaholic-deactivate-contact">\
32
+ ' + strings.email_request + '\
33
+ </div>\
34
+ <input type="email" name="email" class="shareaholic-deactivate-input" value="' + strings.email + '">\
35
+ <div class="shareaholic-deactivate-divider"></div>\
36
+ <div class="shareaholic-deactivate-dialog-footer">\
37
+ <span class="spinner" style="float: none;"></span> \
38
+ <input type="submit" class="button confirm button-secondary" id="shareaholic-deactivate-submit" value="' + strings.skip_and_deactivate + '"/>\
39
+ <button data-remodal-action="cancel" class="button button-secondary">' + strings.cancel + '</button>\
40
+ </div>\
41
+ </form>\
42
+ </div>\
43
+ </div>\
44
+ ')[0];
45
+ this.element = element;
46
+
47
+ $(element).find("input[name='plugin']").val(JSON.stringify(plugin));
48
+
49
+ $(element).on("click", "input[name='reason']", function(event) {
50
+ var submit_input = $(element).find("input[type='submit']");
51
+ var comment_textarea = $(element).find('#shareaholic-deactivate-comment-area');
52
+ if(self.plugin.reasons_needing_comment.indexOf(event.target.value) > -1){
53
+ comment_textarea.appendTo($(event.target).parent().parent());
54
+ comment_textarea.show();
55
+ } else {
56
+ comment_textarea.hide();
57
+ }
58
+ submit_input.val(
59
+ strings.submit_and_deactivate
60
+ );
61
+ self.maybeDisableSubmit();
62
+ });
63
+
64
+ $(element).find('textarea#shareaholic-deactivate-comment').keyup(function(){
65
+ self.maybeDisableSubmit();
66
+ });
67
+
68
+ $(element).find("form").on("submit", function(event) {
69
+ self.onSubmit(event);
70
+ });
71
+
72
+ // Reasons list
73
+ var ul = $(element).find("ul.shareaholic-deactivate-reasons");
74
+ for(var key in plugin.reasons)
75
+ {
76
+ var li = $("<li><label><input type='radio' name='reason'/> <span></span></label></li>");
77
+
78
+ $(li).find("input").val(key);
79
+ $(li).find("span").html(plugin.reasons[key]);
80
+
81
+ $(ul).append(li);
82
+ }
83
+
84
+ // Listen for deactivate
85
+ $("#the-list [data-plugin='" + plugin.basename + "'] .deactivate>a").on("click", function(event) {
86
+ self.onDeactivateClicked(event);
87
+ });
88
+ }
89
+
90
+ shareaholic.DeactivateFeedbackForm.prototype.maybeDisableSubmit = function (){
91
+ var submit_input = $("#shareaholic-deactivate-submit");
92
+ var comment_textarea = $('textarea#shareaholic-deactivate-comment');
93
+ var reason_value = $('input[name="reason"]:checked').val();
94
+ if(this.plugin.reasons_needing_comment.indexOf(reason_value) > -1
95
+ && comment_textarea.val().replace(/\s/g, '') === ''){
96
+ submit_input.prop('disabled',true);
97
+ submit_input.prop('title',shareaholic_deactivate_feedback_form_strings.please_tell_us);
98
+ } else {
99
+ submit_input.prop('disabled',false);
100
+ submit_input.prop('title','');
101
+ }
102
+ }
103
+
104
+ shareaholic.DeactivateFeedbackForm.prototype.onDeactivateClicked = function(event)
105
+ {
106
+ this.deactivateURL = event.target.href;
107
+
108
+
109
+ if(!this.dialog)
110
+ this.dialog = $(this.element).remodal();
111
+ this.dialog.open();
112
+ event.preventDefault();
113
+ }
114
+
115
+ shareaholic.DeactivateFeedbackForm.prototype.onSubmit = function(event)
116
+ {
117
+ var element = this.element;
118
+ var strings = shareaholic_deactivate_feedback_form_strings;
119
+ var self = this;
120
+ var data = this.plugin.send;
121
+ data.survey_response={
122
+ contact:{
123
+ email: $(element).find("input[name='email']").val()
124
+ },
125
+ type:'uninstall',
126
+ data:{
127
+ reason_id: $(element).find("input[name='reason']").val(),
128
+ reason_comment: $(element).find("textarea[name='comment']").val()
129
+ }
130
+ };
131
+
132
+ $(element).find("button, input[type='submit']").prop("disabled", true);
133
+ $(element).find("input[type='submit']").val(strings.please_wait);
134
+ $(element).find("button, input[type='submit']").siblings('.spinner').addClass('is-active');
135
+
136
+ if($(element).find("input[name='reason']:checked").length)
137
+ {
138
+ $.ajax({
139
+ type: "POST",
140
+ url: "https://" + this.plugin.api_server + "/api/plugin_surveys",
141
+ data: JSON.stringify(data),
142
+ contentType: 'application/json',
143
+ dataType: 'json',
144
+ success: function(response, textStatus) {
145
+ window.location.href = self.deactivateURL;
146
+ },
147
+ error: function(response, textStatus, errorThrown) {
148
+ window.location.href = self.deactivateURL;
149
+ },
150
+ });
151
+ }
152
+ else
153
+ {
154
+ window.location.href = self.deactivateURL;
155
+ }
156
+ event.preventDefault();
157
+ return false;
158
+ }
159
+
160
+ $(document).ready(function() {
161
+
162
+ for(var i = 0; i < shareaholic_deactivate_feedback_form_plugins.length; i++)
163
+ {
164
+ var plugin = shareaholic_deactivate_feedback_form_plugins[i];
165
+ new shareaholic.DeactivateFeedbackForm(plugin);
166
+ }
167
+
168
+ });
169
+
170
+ })(jQuery);
lib/plugin-deactivation-survey/deactivate-feedback-form.php ADDED
@@ -0,0 +1,59 @@
1
+ <?php
2
+ if(!is_admin())
3
+ return;
4
+
5
+ global $pagenow;
6
+
7
+ if($pagenow != "plugins.php")
8
+ return;
9
+
10
+ if(! function_exists('shareaholic_deactivate_feedback')) {
11
+ function shareaholic_deactivate_feedback() {
12
+ // Plugins
13
+ /**
14
+ * Each plugin adds an array to this filtered value in order to register itself. Please see the callback
15
+ * to see the expected structure of the array
16
+ */
17
+ $plugins = apply_filters( 'shareaholic_deactivate_feedback_form_plugins', array() );
18
+
19
+ if(! $plugins){
20
+ return;
21
+ }
22
+
23
+ // Enqueue scripts
24
+ wp_enqueue_script( 'remodal', plugin_dir_url( __FILE__ ) . 'remodal.min.js', array(), '1.1.1' );
25
+ wp_enqueue_style( 'remodal', plugin_dir_url( __FILE__ ) . 'remodal.css', array(), '1.1.1' );
26
+ wp_enqueue_style( 'remodal-default-theme', plugin_dir_url( __FILE__ ) . 'remodal-default-theme.css', array(), YARPP_VERSION );
27
+
28
+ wp_enqueue_script( 'shareaholic-deactivate-feedback-form',
29
+ plugin_dir_url( __FILE__ ) . 'deactivate-feedback-form.js', array(), YARPP_VERSION );
30
+ wp_enqueue_style( 'shareaholic-deactivate-feedback-form',
31
+ plugin_dir_url( __FILE__ ) . 'deactivate-feedback-form.css', array(), YARPP_VERSION );
32
+
33
+ $current_user = wp_get_current_user();
34
+ if ( $current_user instanceof WP_User && $current_user->ID ) {
35
+ $email = $current_user->user_email;
36
+ } else {
37
+ $email = '';
38
+ }
39
+
40
+ // Localized strings
41
+ wp_localize_script(
42
+ 'shareaholic-deactivate-feedback-form',
43
+ 'shareaholic_deactivate_feedback_form_strings',
44
+ array_merge(
45
+ $plugins[0]->translations,
46
+ array(
47
+ 'email' => $email,
48
+ )
49
+ )
50
+ );
51
+
52
+ // Send plugin data
53
+ wp_localize_script( 'shareaholic-deactivate-feedback-form',
54
+ 'shareaholic_deactivate_feedback_form_plugins',
55
+ $plugins );
56
+ }
57
+ }
58
+
59
+ add_action('admin_enqueue_scripts', 'shareaholic_deactivate_feedback');
lib/plugin-deactivation-survey/remodal-default-theme.css ADDED
@@ -0,0 +1,307 @@
1
+ /*
2
+ * Remodal - v1.1.1
3
+ * Responsive, lightweight, fast, synchronized with CSS animations, fully customizable modal window plugin with declarative configuration and hash tracking.
4
+ * http://vodkabears.github.io/remodal/
5
+ *
6
+ * Made by Ilya Makarov
7
+ * Under MIT License
8
+ */
9
+
10
+ /* ==========================================================================
11
+ Remodal's default mobile first theme
12
+ ========================================================================== */
13
+
14
+ /* Default theme styles of the overlay */
15
+
16
+ .remodal-overlay {
17
+ background: rgba(43, 46, 56, 0.7);
18
+ }
19
+
20
+ .remodal-overlay.remodal-is-opening,
21
+ .remodal-overlay.remodal-is-closing {
22
+ -webkit-animation-duration: 0.1s;
23
+ animation-duration: 0.1s;
24
+ -webkit-animation-fill-mode: forwards;
25
+ animation-fill-mode: forwards;
26
+ }
27
+
28
+ .remodal-overlay.remodal-is-opening {
29
+ -webkit-animation-name: remodal-overlay-opening-keyframes;
30
+ animation-name: remodal-overlay-opening-keyframes;
31
+ }
32
+
33
+ .remodal-overlay.remodal-is-closing {
34
+ -webkit-animation-name: remodal-overlay-closing-keyframes;
35
+ animation-name: remodal-overlay-closing-keyframes;
36
+ }
37
+
38
+ /* Default theme styles of the wrapper */
39
+
40
+ .remodal-wrapper {
41
+ padding: 10px 10px 0;
42
+ }
43
+
44
+ /* Default theme styles of the modal dialog */
45
+
46
+ .remodal {
47
+ box-sizing: border-box;
48
+ width: 100%;
49
+ margin-bottom: 10px;
50
+ padding: 30px 30px 5px 30px;
51
+
52
+ -webkit-transform: translate3d(0, 0, 0);
53
+ transform: translate3d(0, 0, 0);
54
+
55
+ color: #2b2e38;
56
+ background: #fff;
57
+ }
58
+
59
+ .remodal.remodal-is-opening {
60
+ -webkit-animation-name: remodal-opening-keyframes;
61
+ animation-name: remodal-opening-keyframes;
62
+ }
63
+
64
+ .remodal.remodal-is-closing {
65
+ -webkit-animation-name: remodal-closing-keyframes;
66
+ animation-name: remodal-closing-keyframes;
67
+ }
68
+
69
+ /* Vertical align of the modal dialog */
70
+
71
+ .remodal,
72
+ .remodal-wrapper:after {
73
+ vertical-align: middle;
74
+ }
75
+
76
+ /* Close button */
77
+
78
+ .remodal-close {
79
+ position: absolute;
80
+ top: 0;
81
+ left: 0;
82
+
83
+ display: block;
84
+ overflow: visible;
85
+
86
+ width: 35px;
87
+ height: 35px;
88
+ margin: 0;
89
+ padding: 0;
90
+
91
+ cursor: pointer;
92
+ -webkit-transition: color 0.2s;
93
+ transition: color 0.2s;
94
+ text-decoration: none;
95
+
96
+ color: #95979c;
97
+ border: 0;
98
+ outline: 0;
99
+ background: transparent;
100
+ }
101
+
102
+ .remodal-close:hover,
103
+ .remodal-close:focus {
104
+ color: #2b2e38;
105
+ }
106
+
107
+ .remodal-close:before {
108
+ font-family: Arial, "Helvetica CY", "Nimbus Sans L", sans-serif !important;
109
+ font-size: 25px;
110
+ line-height: 35px;
111
+
112
+ position: absolute;
113
+ top: 0;
114
+ left: 0;
115
+
116
+ display: block;
117
+
118
+ width: 35px;
119
+
120
+ content: "\00d7";
121
+ text-align: center;
122
+ }
123
+
124
+ /* Dialog buttons */
125
+
126
+ .remodal-confirm,
127
+ .remodal-cancel {
128
+ font: inherit;
129
+
130
+ display: inline-block;
131
+ overflow: visible;
132
+
133
+ min-width: 110px;
134
+ margin: 0;
135
+ padding: 12px 0;
136
+
137
+ cursor: pointer;
138
+ -webkit-transition: background 0.2s;
139
+ transition: background 0.2s;
140
+ text-align: center;
141
+ vertical-align: middle;
142
+ text-decoration: none;
143
+
144
+ border: 0;
145
+ outline: 0;
146
+ }
147
+
148
+ .remodal-confirm {
149
+ color: #fff;
150
+ background: #81c784;
151
+ }
152
+
153
+ .remodal-confirm:hover,
154
+ .remodal-confirm:focus {
155
+ background: #66bb6a;
156
+ }
157
+
158
+ .remodal-cancel {
159
+ color: #fff;
160
+ background: #e57373;
161
+ }
162
+
163
+ .remodal-cancel:hover,
164
+ .remodal-cancel:focus {
165
+ background: #ef5350;
166
+ }
167
+
168
+ /* Remove inner padding and border in Firefox 4+ for the button tag. */
169
+
170
+ .remodal-confirm::-moz-focus-inner,
171
+ .remodal-cancel::-moz-focus-inner,
172
+ .remodal-close::-moz-focus-inner {
173
+ padding: 0;
174
+
175
+ border: 0;
176
+ }
177
+
178
+ /* Keyframes
179
+ ========================================================================== */
180
+
181
+ @-webkit-keyframes remodal-opening-keyframes {
182
+ from {
183
+ -webkit-transform: scale(1.05);
184
+ transform: scale(1.05);
185
+
186
+ opacity: 0;
187
+ }
188
+ to {
189
+ -webkit-transform: none;
190
+ transform: none;
191
+
192
+ opacity: 1;
193
+
194
+ -webkit-filter: blur(0);
195
+ filter: blur(0);
196
+ }
197
+ }
198
+
199
+ @keyframes remodal-opening-keyframes {
200
+ from {
201
+ -webkit-transform: scale(1.05);
202
+ transform: scale(1.05);
203
+
204
+ opacity: 0;
205
+ }
206
+ to {
207
+ -webkit-transform: none;
208
+ transform: none;
209
+
210
+ opacity: 1;
211
+
212
+ -webkit-filter: blur(0);
213
+ filter: blur(0);
214
+ }
215
+ }
216
+
217
+ @-webkit-keyframes remodal-closing-keyframes {
218
+ from {
219
+ -webkit-transform: scale(1);
220
+ transform: scale(1);
221
+
222
+ opacity: 1;
223
+ }
224
+ to {
225
+ -webkit-transform: scale(0.95);
226
+ transform: scale(0.95);
227
+
228
+ opacity: 0;
229
+
230
+ -webkit-filter: blur(0);
231
+ filter: blur(0);
232
+ }
233
+ }
234
+
235
+ @keyframes remodal-closing-keyframes {
236
+ from {
237
+ -webkit-transform: scale(1);
238
+ transform: scale(1);
239
+
240
+ opacity: 1;
241
+ }
242
+ to {
243
+ -webkit-transform: scale(0.95);
244
+ transform: scale(0.95);
245
+
246
+ opacity: 0;
247
+
248
+ -webkit-filter: blur(0);
249
+ filter: blur(0);
250
+ }
251
+ }
252
+
253
+ @-webkit-keyframes remodal-overlay-opening-keyframes {
254
+ from {
255
+ opacity: 0;
256
+ }
257
+ to {
258
+ opacity: 1;
259
+ }
260
+ }
261
+
262
+ @keyframes remodal-overlay-opening-keyframes {
263
+ from {
264
+ opacity: 0;
265
+ }
266
+ to {
267
+ opacity: 1;
268
+ }
269
+ }
270
+
271
+ @-webkit-keyframes remodal-overlay-closing-keyframes {
272
+ from {
273
+ opacity: 1;
274
+ }
275
+ to {
276
+ opacity: 0;
277
+ }
278
+ }
279
+
280
+ @keyframes remodal-overlay-closing-keyframes {
281
+ from {
282
+ opacity: 1;
283
+ }
284
+ to {
285
+ opacity: 0;
286
+ }
287
+ }
288
+
289
+ /* Media queries
290
+ ========================================================================== */
291
+
292
+ @media only screen and (min-width: 641px) {
293
+ .remodal {
294
+ max-width: 550px;
295
+ }
296
+ }
297
+
298
+ /* IE8
299
+ ========================================================================== */
300
+
301
+ .lt-ie9 .remodal-overlay {
302
+ background: #2b2e38;
303
+ }
304
+
305
+ .lt-ie9 .remodal {
306
+ width: 550px;
307
+ }
lib/plugin-deactivation-survey/remodal.css ADDED
@@ -0,0 +1,95 @@
1
+ /*
2
+ * Remodal - v1.1.1
3
+ * Responsive, lightweight, fast, synchronized with CSS animations, fully customizable modal window plugin with declarative configuration and hash tracking.
4
+ * http://vodkabears.github.io/remodal/
5
+ *
6
+ * Made by Ilya Makarov
7
+ * Under MIT License
8
+ */
9
+
10
+ /* ==========================================================================
11
+ Remodal's necessary styles
12
+ ========================================================================== */
13
+
14
+ /* Hide scroll bar */
15
+
16
+ html.remodal-is-locked {
17
+ overflow: hidden;
18
+
19
+ -ms-touch-action: none;
20
+ touch-action: none;
21
+ }
22
+
23
+ /* Anti FOUC */
24
+
25
+ .remodal,
26
+ [data-remodal-id] {
27
+ display: none;
28
+ }
29
+
30
+ /* Necessary styles of the overlay */
31
+
32
+ .remodal-overlay {
33
+ position: fixed;
34
+ z-index: 9999;
35
+ top: -5000px;
36
+ right: -5000px;
37
+ bottom: -5000px;
38
+ left: -5000px;
39
+
40
+ display: none;
41
+ }
42
+
43
+ /* Necessary styles of the wrapper */
44
+
45
+ .remodal-wrapper {
46
+ position: fixed;
47
+ z-index: 10000;
48
+ top: 0;
49
+ right: 0;
50
+ bottom: 0;
51
+ left: 0;
52
+
53
+ display: none;
54
+ overflow: auto;
55
+
56
+ text-align: center;
57
+
58
+ -webkit-overflow-scrolling: touch;
59
+ }
60
+
61
+ .remodal-wrapper:after {
62
+ display: inline-block;
63
+
64
+ height: 100%;
65
+ margin-left: -0.05em;
66
+
67
+ content: "";
68
+ }
69
+
70
+ /* Fix iPad, iPhone glitches */
71
+
72
+ .remodal-overlay,
73
+ .remodal-wrapper {
74
+ -webkit-backface-visibility: hidden;
75
+ backface-visibility: hidden;
76
+ }
77
+
78
+ /* Necessary styles of the modal dialog */
79
+
80
+ .remodal {
81
+ position: relative;
82
+
83
+ outline: none;
84
+
85
+ -webkit-text-size-adjust: 100%;
86
+ -ms-text-size-adjust: 100%;
87
+ text-size-adjust: 100%;
88
+ }
89
+
90
+ .remodal-is-initialized {
91
+ /* Disable Anti-FOUC */
92
+ display: inline-block;
93
+ }
94
+
95
+
lib/plugin-deactivation-survey/remodal.min.js ADDED
@@ -0,0 +1,10 @@
1
+ /*
2
+ * Remodal - v1.1.1
3
+ * Responsive, lightweight, fast, synchronized with CSS animations, fully customizable modal window plugin with declarative configuration and hash tracking.
4
+ * http://vodkabears.github.io/remodal/
5
+ *
6
+ * Made by Ilya Makarov
7
+ * Under MIT License
8
+ */
9
+
10
+ !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return b(a,c)}):"object"==typeof exports?b(a,require("jquery")):b(a,a.jQuery||a.Zepto)}(this,function(a,b){"use strict";function c(a){if(w&&"none"===a.css("animation-name")&&"none"===a.css("-webkit-animation-name")&&"none"===a.css("-moz-animation-name")&&"none"===a.css("-o-animation-name")&&"none"===a.css("-ms-animation-name"))return 0;var b,c,d,e,f=a.css("animation-duration")||a.css("-webkit-animation-duration")||a.css("-moz-animation-duration")||a.css("-o-animation-duration")||a.css("-ms-animation-duration")||"0s",g=a.css("animation-delay")||a.css("-webkit-animation-delay")||a.css("-moz-animation-delay")||a.css("-o-animation-delay")||a.css("-ms-animation-delay")||"0s",h=a.css("animation-iteration-count")||a.css("-webkit-animation-iteration-count")||a.css("-moz-animation-iteration-count")||a.css("-o-animation-iteration-count")||a.css("-ms-animation-iteration-count")||"1";for(f=f.split(", "),g=g.split(", "),h=h.split(", "),e=0,c=f.length,b=Number.NEGATIVE_INFINITY;e<c;e++)d=parseFloat(f[e])*parseInt(h[e],10)+parseFloat(g[e]),d>b&&(b=d);return b}function d(){if(b(document).height()<=b(window).height())return 0;var a,c,d=document.createElement("div"),e=document.createElement("div");return d.style.visibility="hidden",d.style.width="100px",document.body.appendChild(d),a=d.offsetWidth,d.style.overflow="scroll",e.style.width="100%",d.appendChild(e),c=e.offsetWidth,d.parentNode.removeChild(d),a-c}function e(){if(!x){var a,c,e=b("html"),f=k("is-locked");e.hasClass(f)||(c=b(document.body),a=parseInt(c.css("padding-right"),10)+d(),c.css("padding-right",a+"px"),e.addClass(f))}}function f(){if(!x){var a,c,e=b("html"),f=k("is-locked");e.hasClass(f)&&(c=b(document.body),a=parseInt(c.css("padding-right"),10)-d(),c.css("padding-right",a+"px"),e.removeClass(f))}}function g(a,b,c,d){var e=k("is",b),f=[k("is",u.CLOSING),k("is",u.OPENING),k("is",u.CLOSED),k("is",u.OPENED)].join(" ");a.$bg.removeClass(f).addClass(e),a.$overlay.removeClass(f).addClass(e),a.$wrapper.removeClass(f).addClass(e),a.$modal.removeClass(f).addClass(e),a.state=b,!c&&a.$modal.trigger({type:b,reason:d},[{reason:d}])}function h(a,d,e){var f=0,g=function(a){a.target===this&&f++},h=function(a){a.target===this&&0===--f&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].off(r+" "+s)}),d())};b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].on(r,g).on(s,h)}),a(),0===c(e.$bg)&&0===c(e.$overlay)&&0===c(e.$wrapper)&&0===c(e.$modal)&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].off(r+" "+s)}),d())}function i(a){a.state!==u.CLOSED&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(b,c){a[c].off(r+" "+s)}),a.$bg.removeClass(a.settings.modifier),a.$overlay.removeClass(a.settings.modifier).hide(),a.$wrapper.hide(),f(),g(a,u.CLOSED,!0))}function j(a){var b,c,d,e,f={};for(a=a.replace(/\s*:\s*/g,":").replace(/\s*,\s*/g,","),b=a.split(","),e=0,c=b.length;e<c;e++)b[e]=b[e].split(":"),d=b[e][1],("string"==typeof d||d instanceof String)&&(d="true"===d||"false"!==d&&d),("string"==typeof d||d instanceof String)&&(d=isNaN(d)?d:+d),f[b[e][0]]=d;return f}function k(){for(var a=q,b=0;b<arguments.length;++b)a+="-"+arguments[b];return a}function l(){var a,c,d=location.hash.replace("#","");if(d){try{c=b('[data-remodal-id="'+d+'"]')}catch(e){}c&&c.length&&(a=b[p].lookup[c.data(p)],a&&a.settings.hashTracking&&a.open())}else n&&n.state===u.OPENED&&n.settings.hashTracking&&n.close()}function m(a,c){var d=b(document.body),e=d,f=this;f.settings=b.extend({},t,c),f.index=b[p].lookup.push(f)-1,f.state=u.CLOSED,f.$overlay=b("."+k("overlay")),null!==f.settings.appendTo&&f.settings.appendTo.length&&(e=b(f.settings.appendTo)),f.$overlay.length||(f.$overlay=b("<div>").addClass(k("overlay")+" "+k("is",u.CLOSED)).hide(),e.append(f.$overlay)),f.$bg=b("."+k("bg")).addClass(k("is",u.CLOSED)),f.$modal=a.addClass(q+" "+k("is-initialized")+" "+f.settings.modifier+" "+k("is",u.CLOSED)).attr("tabindex","-1"),f.$wrapper=b("<div>").addClass(k("wrapper")+" "+f.settings.modifier+" "+k("is",u.CLOSED)).hide().append(f.$modal),e.append(f.$wrapper),f.$wrapper.on("click."+q,'[data-remodal-action="close"]',function(a){a.preventDefault(),f.close()}),f.$wrapper.on("click."+q,'[data-remodal-action="cancel"]',function(a){a.preventDefault(),f.$modal.trigger(v.CANCELLATION),f.settings.closeOnCancel&&f.close(v.CANCELLATION)}),f.$wrapper.on("click."+q,'[data-remodal-action="confirm"]',function(a){a.preventDefault(),f.$modal.trigger(v.CONFIRMATION),f.settings.closeOnConfirm&&f.close(v.CONFIRMATION)}),f.$wrapper.on("click."+q,function(a){var c=b(a.target);c.hasClass(k("wrapper"))&&f.settings.closeOnOutsideClick&&f.close()})}var n,o,p="remodal",q=a.REMODAL_GLOBALS&&a.REMODAL_GLOBALS.NAMESPACE||p,r=b.map(["animationstart","webkitAnimationStart","MSAnimationStart","oAnimationStart"],function(a){return a+"."+q}).join(" "),s=b.map(["animationend","webkitAnimationEnd","MSAnimationEnd","oAnimationEnd"],function(a){return a+"."+q}).join(" "),t=b.extend({hashTracking:!0,closeOnConfirm:!0,closeOnCancel:!0,closeOnEscape:!0,closeOnOutsideClick:!0,modifier:"",appendTo:null},a.REMODAL_GLOBALS&&a.REMODAL_GLOBALS.DEFAULTS),u={CLOSING:"closing",CLOSED:"closed",OPENING:"opening",OPENED:"opened"},v={CONFIRMATION:"confirmation",CANCELLATION:"cancellation"},w=function(){var a=document.createElement("div").style;return void 0!==a.animationName||void 0!==a.WebkitAnimationName||void 0!==a.MozAnimationName||void 0!==a.msAnimationName||void 0!==a.OAnimationName}(),x=/iPad|iPhone|iPod/.test(navigator.platform);m.prototype.open=function(){var a,c=this;c.state!==u.OPENING&&c.state!==u.CLOSING&&(a=c.$modal.attr("data-remodal-id"),a&&c.settings.hashTracking&&(o=b(window).scrollTop(),location.hash=a),n&&n!==c&&i(n),n=c,e(),c.$bg.addClass(c.settings.modifier),c.$overlay.addClass(c.settings.modifier).show(),c.$wrapper.show().scrollTop(0),c.$modal.focus(),h(function(){g(c,u.OPENING)},function(){g(c,u.OPENED)},c))},m.prototype.close=function(a){var c=this;c.state!==u.OPENING&&c.state!==u.CLOSING&&c.state!==u.CLOSED&&(c.settings.hashTracking&&c.$modal.attr("data-remodal-id")===location.hash.substr(1)&&(location.hash="",b(window).scrollTop(o)),h(function(){g(c,u.CLOSING,!1,a)},function(){c.$bg.removeClass(c.settings.modifier),c.$overlay.removeClass(c.settings.modifier).hide(),c.$wrapper.hide(),f(),g(c,u.CLOSED,!1,a)},c))},m.prototype.getState=function(){return this.state},m.prototype.destroy=function(){var a,c=b[p].lookup;i(this),this.$wrapper.remove(),delete c[this.index],a=b.grep(c,function(a){return!!a}).length,0===a&&(this.$overlay.remove(),this.$bg.removeClass(k("is",u.CLOSING)+" "+k("is",u.OPENING)+" "+k("is",u.CLOSED)+" "+k("is",u.OPENED)))},b[p]={lookup:[]},b.fn[p]=function(a){var c,d;return this.each(function(e,f){d=b(f),null==d.data(p)?(c=new m(d,a),d.data(p,c.index),c.settings.hashTracking&&d.attr("data-remodal-id")===location.hash.substr(1)&&c.open()):c=b[p].lookup[d.data(p)]}),c},b(document).ready(function(){b(document).on("click","[data-remodal-target]",function(a){a.preventDefault();var c=a.currentTarget,d=c.getAttribute("data-remodal-target"),e=b('[data-remodal-id="'+d+'"]');b[p].lookup[e.data(p)].open()}),b(document).find("."+q).each(function(a,c){var d=b(c),e=d.data("remodal-options");e?("string"==typeof e||e instanceof String)&&(e=j(e)):e={},d[p](e)}),b(document).on("keydown."+q,function(a){n&&n.settings.closeOnEscape&&n.state===u.OPENED&&27===a.keyCode&&n.close()}),b(window).on("hashchange."+q,l)})});
readme.txt CHANGED
@@ -2,10 +2,10 @@
2
Contributors: jeffparker, shareaholic
3
Tags: related, related posts, similar posts, posts, pages, thumbnails, feeds, multisite, multilingual
4
Requires at least: 3.7
5
- Requires PHP: 5.2
6
License: GPLv2 or later
7
Tested up to: 5.4
8
- Stable tag: 5.1.3
9
10
Display a list of related posts on your site based on a powerful unique algorithm. Optionally, earn money by including sponsored content.
11
@@ -21,9 +21,9 @@ Yet Another Related Posts Plugin (YARPP) displays pages, posts, and custom post
21
* **An advanced and versatile algorithm**: Using a customizable algorithm considering post titles, content, tags, categories, and custom taxonomies, YARPP finds related content from across your site. [Learn More.](https://wordpress.tv/2011/01/29/michael-mitcho-erlewine-the-yet-another-related-posts-plugin-algorithm-explained/)
22
* **Related posts in feeds**: Display related posts in RSS feeds with custom display options.
23
24
- The **Yet Another Related Posts Plugin** is the most popular [WordPress Related Posts plugin](https://wordpress.org/plugins/yet-another-related-posts-plugin/), encouraging Discovery and Engagement since 2008.
25
26
- This plugin requires PHP 5, MySQL 4.1, and WordPress 3.3 or greater. See [the FAQ](https://wordpress.org/plugins/yet-another-related-posts-plugin/faq/) for answers to common questions.
27
28
== Installation ==
29
@@ -248,7 +248,24 @@ function yarpp_disable_review_notice() {
248
add_action('admin_init', 'yarpp_disable_review_notice', 11);
249
`
250
251
== Changelog ==
252
= 5.1.3 (2020-04-07) =
253
* Support for WordPress 5.4+
254
* Enhancement: Switch over to secure (https) endpoints
@@ -911,6 +928,6 @@ After a break of many years, the plugin is 100% supported now that the baton has
911
* Initial upload
912
913
== Upgrade Notice ==
914
- = 5.1.3 =
915
We update this plugin regularly so we can make it better for you. Update to the latest version for all of the available features and improvements. Thank you for using YARPP!
916
2
Contributors: jeffparker, shareaholic
3
Tags: related, related posts, similar posts, posts, pages, thumbnails, feeds, multisite, multilingual
4
Requires at least: 3.7
5
+ Requires PHP: 5.3
6
License: GPLv2 or later
7
Tested up to: 5.4
8
+ Stable tag: 5.1.4
9
10
Display a list of related posts on your site based on a powerful unique algorithm. Optionally, earn money by including sponsored content.
11
21
* **An advanced and versatile algorithm**: Using a customizable algorithm considering post titles, content, tags, categories, and custom taxonomies, YARPP finds related content from across your site. [Learn More.](https://wordpress.tv/2011/01/29/michael-mitcho-erlewine-the-yet-another-related-posts-plugin-algorithm-explained/)
22
* **Related posts in feeds**: Display related posts in RSS feeds with custom display options.
23
24
+ The **Yet Another Related Posts Plugin** is the most popular and widely used [Related Posts plugin for WordPress](https://wordpress.org/plugins/yet-another-related-posts-plugin/), encouraging Discovery and Engagement since 2008.
25
26
+ This plugin requires PHP 5.3, MySQL 4.1, and WordPress 3.7 or greater. See [the FAQ](https://wordpress.org/plugins/yet-another-related-posts-plugin/faq/) for answers to common questions.
27
28
== Installation ==
29
248
add_action('admin_init', 'yarpp_disable_review_notice', 11);
249
`
250
251
+ = Can I disable the request-for-feedback modal when deactivating the plugin? =
252
+ Sure. Use the following code:
253
+
254
+ `
255
+ add_action(
256
+ 'admin_init',
257
+ function(){
258
+ remove_all_filters('shareaholic_deactivate_feedback_form_plugins');
259
+ },
260
+ 11
261
+ );
262
+ `
263
+
264
== Changelog ==
265
+ = 5.1.4 (2020-05-11) =
266
+ * Require PHP 5.3 as a bare minimum for compatibility features
267
+ * New: Display optional feedback form on plugin deactivation
268
+
269
= 5.1.3 (2020-04-07) =
270
* Support for WordPress 5.4+
271
* Enhancement: Switch over to secure (https) endpoints
928
* Initial upload
929
930
== Upgrade Notice ==
931
+ = 5.1.4 =
932
We update this plugin regularly so we can make it better for you. Update to the latest version for all of the available features and improvements. Thank you for using YARPP!
933
yarpp.php CHANGED
@@ -1,8 +1,8 @@
1
<?php
2
/*
3
- Plugin Name: Yet Another Related Posts Plugin
4
Description: Adds related posts to your site and in RSS feeds, based on a powerful, customizable algorithm.
5
- Version: 5.1.3
6
Author: YARPP
7
Author URI: https://yarpp.com/
8
Plugin URI: https://yarpp.com/
@@ -23,9 +23,12 @@ if(!defined('WP_CONTENT_DIR')){
23
define('WP_CONTENT_DIR', substr($tr,0,strrpos($tr,'/')));
24
}
25
26
- define('YARPP_VERSION', '5.1.3');
27
define('YARPP_DIR', dirname(__FILE__));
28
define('YARPP_URL', plugins_url('',__FILE__));
29
define('YARPP_NO_RELATED', ':(');
30
define('YARPP_RELATED', ':)');
31
define('YARPP_NOT_CACHED', ':/');
@@ -66,7 +69,8 @@ include_once(YARPP_DIR.'/classes/YARPP_Widget.php');
66
include_once(YARPP_DIR.'/classes/YARPP_Cache.php');
67
include_once(YARPP_DIR.'/classes/YARPP_Cache_Bypass.php');
68
include_once(YARPP_DIR.'/classes/YARPP_Cache_'.ucfirst(YARPP_CACHE_TYPE).'.php');
69
70
/* WP hooks ----------------------------------------------------------------------------------------------------------*/
71
add_action('init', 'yarpp_init');
72
- add_action('activate_'.plugin_basename(__FILE__), 'yarpp_plugin_activate', 10, 1);
1
<?php
2
/*
3
+ Plugin Name: Yet Another Related Posts Plugin (YARPP)
4
Description: Adds related posts to your site and in RSS feeds, based on a powerful, customizable algorithm.
5
+ Version: 5.1.4
6
Author: YARPP
7
Author URI: https://yarpp.com/
8
Plugin URI: https://yarpp.com/
23
define('WP_CONTENT_DIR', substr($tr,0,strrpos($tr,'/')));
24
}
25
26
+ define('YARPP_VERSION', '5.1.4');
27
+
28
define('YARPP_DIR', dirname(__FILE__));
29
define('YARPP_URL', plugins_url('',__FILE__));
30
+ define('YARPP_MAIN_FILE',__FILE__);
31
+
32
define('YARPP_NO_RELATED', ':(');
33
define('YARPP_RELATED', ':)');
34
define('YARPP_NOT_CACHED', ':/');
69
include_once(YARPP_DIR.'/classes/YARPP_Cache.php');
70
include_once(YARPP_DIR.'/classes/YARPP_Cache_Bypass.php');
71
include_once(YARPP_DIR.'/classes/YARPP_Cache_'.ucfirst(YARPP_CACHE_TYPE).'.php');
72
+ include_once( YARPP_DIR . '/lib/plugin-deactivation-survey/deactivate-feedback-form.php' );
73
74
/* WP hooks ----------------------------------------------------------------------------------------------------------*/
75
add_action('init', 'yarpp_init');
76
+ add_action('activate_'.plugin_basename(__FILE__), 'yarpp_plugin_activate', 10, 1);