Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/poptin
File: deactivate-form.php
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
[0] Fix | Delete
<style>
[1] Fix | Delete
.poptin-hidden {
[2] Fix | Delete
overflow: hidden;
[3] Fix | Delete
}
[4] Fix | Delete
.poptin-popup-overlay .poptin-internal-message {
[5] Fix | Delete
margin: 3px 0 3px 22px;
[6] Fix | Delete
display: none;
[7] Fix | Delete
}
[8] Fix | Delete
.poptin-reason-input {
[9] Fix | Delete
margin: 3px 0 3px 22px;
[10] Fix | Delete
display: none;
[11] Fix | Delete
}
[12] Fix | Delete
.poptin-reason-input input[type="text"] {
[13] Fix | Delete
width: 100%;
[14] Fix | Delete
display: block;
[15] Fix | Delete
}
[16] Fix | Delete
.poptin-popup-overlay {
[17] Fix | Delete
background: rgba(0, 0, 0, .8);
[18] Fix | Delete
position: fixed;
[19] Fix | Delete
top: 0;
[20] Fix | Delete
left: 0;
[21] Fix | Delete
height: 100%;
[22] Fix | Delete
width: 100%;
[23] Fix | Delete
z-index: 1000;
[24] Fix | Delete
overflow: auto;
[25] Fix | Delete
visibility: hidden;
[26] Fix | Delete
opacity: 0;
[27] Fix | Delete
transition: opacity 0.3s ease-in-out :
[28] Fix | Delete
}
[29] Fix | Delete
.poptin-popup-overlay.poptin-active {
[30] Fix | Delete
opacity: 1;
[31] Fix | Delete
visibility: visible;
[32] Fix | Delete
}
[33] Fix | Delete
.poptin-serveypanel {
[34] Fix | Delete
width: 600px;
[35] Fix | Delete
background: #fff;
[36] Fix | Delete
margin: 65px auto 0;
[37] Fix | Delete
}
[38] Fix | Delete
.poptin-popup-header {
[39] Fix | Delete
background: #f1f1f1;
[40] Fix | Delete
padding: 20px;
[41] Fix | Delete
border-bottom: 1px solid #ccc;
[42] Fix | Delete
}
[43] Fix | Delete
.poptin-popup-header h2 {
[44] Fix | Delete
margin: 0;
[45] Fix | Delete
}
[46] Fix | Delete
.poptin-popup-body {
[47] Fix | Delete
padding: 10px 20px;
[48] Fix | Delete
}
[49] Fix | Delete
.poptin-popup-footer {
[50] Fix | Delete
background: #f9f3f3;
[51] Fix | Delete
padding: 10px 20px;
[52] Fix | Delete
border-top: 1px solid #ccc;
[53] Fix | Delete
}
[54] Fix | Delete
.poptin-popup-footer:after {
[55] Fix | Delete
content: "";
[56] Fix | Delete
display: table;
[57] Fix | Delete
clear: both;
[58] Fix | Delete
}
[59] Fix | Delete
.action-btns {
[60] Fix | Delete
float: right;
[61] Fix | Delete
}
[62] Fix | Delete
.poptin-anonymous {
[63] Fix | Delete
display: none;
[64] Fix | Delete
}
[65] Fix | Delete
.attention, .error-message {
[66] Fix | Delete
color: red;
[67] Fix | Delete
font-weight: 600;
[68] Fix | Delete
display: none;
[69] Fix | Delete
}
[70] Fix | Delete
.poptin-spinner {
[71] Fix | Delete
display: none;
[72] Fix | Delete
}
[73] Fix | Delete
.poptin-spinner img {
[74] Fix | Delete
margin-top: 3px;
[75] Fix | Delete
}
[76] Fix | Delete
.poptin-hidden-input {
[77] Fix | Delete
padding: 10px 0 0;
[78] Fix | Delete
display: none;
[79] Fix | Delete
}
[80] Fix | Delete
.poptin-hidden-input input[type='text'] {
[81] Fix | Delete
padding: 0 10px;
[82] Fix | Delete
width: 100%;
[83] Fix | Delete
height: 26px;
[84] Fix | Delete
line-height: 26px;
[85] Fix | Delete
}
[86] Fix | Delete
.poptin--popup-overlay textarea {
[87] Fix | Delete
padding: 10px;
[88] Fix | Delete
width: 100%;
[89] Fix | Delete
height: 100px;
[90] Fix | Delete
margin: 0 0 15px 0;
[91] Fix | Delete
}
[92] Fix | Delete
span.poptin-error-message {
[93] Fix | Delete
color: #dd0000;
[94] Fix | Delete
font-weight: 600;
[95] Fix | Delete
}
[96] Fix | Delete
.poptin-popup-body h3 {
[97] Fix | Delete
line-height: 24px;
[98] Fix | Delete
}
[99] Fix | Delete
.poptin-popup-body textarea {
[100] Fix | Delete
width: 100%;
[101] Fix | Delete
height: 80px;
[102] Fix | Delete
}
[103] Fix | Delete
.poptin--popup-overlay .form-control input {
[104] Fix | Delete
width: 100%;
[105] Fix | Delete
margin: 0 0 15px 0;
[106] Fix | Delete
}
[107] Fix | Delete
.poptin-serveypanel .form-control input {
[108] Fix | Delete
width: 100%;
[109] Fix | Delete
margin: 0 0 15px 0;
[110] Fix | Delete
}
[111] Fix | Delete
</style>
[112] Fix | Delete
<!-- modal for plugin deactivation popup -->
[113] Fix | Delete
<div class="poptin-popup-overlay">
[114] Fix | Delete
<div class="poptin-serveypanel">
[115] Fix | Delete
<!-- form start -->
[116] Fix | Delete
<form action="#" method="post" id="poptin-deactivate-form">
[117] Fix | Delete
<div class="poptin-popup-header">
[118] Fix | Delete
<h2><?php esc_html_e('Quick feedback about Poptin', 'poptin'); ?> 🙏</h2>
[119] Fix | Delete
</div>
[120] Fix | Delete
<div class="poptin-popup-body">
[121] Fix | Delete
<h3><?php esc_html_e('Your feedback will help us improve the product, please tell us why did you decide to deactivate Poptin :)', 'poptin'); ?></h3>
[122] Fix | Delete
<div class="form-control">
[123] Fix | Delete
<input type="email" value="<?php echo get_option( 'admin_email' ) ?>" placeholder="<?php echo _e("Email address", 'poptin') ?>" id="poptin-deactivation-email_id">
[124] Fix | Delete
</div>
[125] Fix | Delete
<div class="form-control">
[126] Fix | Delete
<label></label>
[127] Fix | Delete
<textarea placeholder="<?php esc_html_e("Your comment", 'poptin') ?>" id="poptin-deactivation-comment"></textarea>
[128] Fix | Delete
</div>
[129] Fix | Delete
</div>
[130] Fix | Delete
<div class="poptin-popup-footer">
[131] Fix | Delete
<label class="poptin-anonymous">
[132] Fix | Delete
<input type="checkbox"/><?php esc_html_e('Anonymous feedback', 'poptin'); ?>
[133] Fix | Delete
</label>
[134] Fix | Delete
<input type="button" class="button button-secondary button-skip poptin-popup-skip-feedback" value="Skip &amp; Deactivate">
[135] Fix | Delete
<div class="action-btns">
[136] Fix | Delete
<span class="poptin-spinner"><img src="<?php echo esc_url(admin_url('/images/spinner.gif')); ?>" alt=""></span>
[137] Fix | Delete
<input type="submit" class="button button-secondary button-deactivate poptin-popup-allow-deactivate" value="Submit &amp; Deactivate" disabled="disabled">
[138] Fix | Delete
<a href="#" class="button button-primary poptin-popup-button-close"><?php esc_html_e('Cancel', 'poptin'); ?></a>
[139] Fix | Delete
</div>
[140] Fix | Delete
</div>
[141] Fix | Delete
</form>
[142] Fix | Delete
<!-- form end -->
[143] Fix | Delete
</div>
[144] Fix | Delete
</div>
[145] Fix | Delete
<script>
[146] Fix | Delete
(function ($) {
[147] Fix | Delete
$(function () {
[148] Fix | Delete
var poptinPluginSlug = 'poptin';
[149] Fix | Delete
// Code to fire when the DOM is ready.
[150] Fix | Delete
$(document).on('click', 'tr[data-slug="' + poptinPluginSlug + '"] .deactivate', function (e) {
[151] Fix | Delete
e.preventDefault();
[152] Fix | Delete
$('.poptin-popup-overlay').addClass('poptin-active');
[153] Fix | Delete
$('body').addClass('poptin-hidden');
[154] Fix | Delete
});
[155] Fix | Delete
$(document).on('click', '.poptin-popup-button-close', function () {
[156] Fix | Delete
close_popup();
[157] Fix | Delete
});
[158] Fix | Delete
$(document).on('click', ".poptin-serveypanel,tr[data-slug='" + poptinPluginSlug + "'] .deactivate", function (e) {
[159] Fix | Delete
e.stopPropagation();
[160] Fix | Delete
});
[161] Fix | Delete
$(document).on('click', function () {
[162] Fix | Delete
close_popup();
[163] Fix | Delete
});
[164] Fix | Delete
$('.poptin-reason label').on('click', function () {
[165] Fix | Delete
$(".poptin-hidden-input").hide();
[166] Fix | Delete
jQuery(".poptin-error-message").remove();
[167] Fix | Delete
if ($(this).find('input[type="radio"]').is(':checked')) {
[168] Fix | Delete
$(this).closest("li").find('.poptin-hidden-input').show();
[169] Fix | Delete
}
[170] Fix | Delete
});
[171] Fix | Delete
$(document).on("keyup", "#poptin-deactivation-comment", function(){
[172] Fix | Delete
if($.trim($(this).val()) == "") {
[173] Fix | Delete
$(".poptin-popup-allow-deactivate").attr("disabled", true);
[174] Fix | Delete
} else {
[175] Fix | Delete
$(".poptin-popup-allow-deactivate").attr("disabled", false);
[176] Fix | Delete
}
[177] Fix | Delete
});
[178] Fix | Delete
$('input[type="radio"][name="poptin-selected-reason"]').on('click', function (event) {
[179] Fix | Delete
$(".poptin-popup-allow-deactivate").removeAttr('disabled');
[180] Fix | Delete
});
[181] Fix | Delete
$(document).on('submit', '#poptin-deactivate-form', function (event) {
[182] Fix | Delete
event.preventDefault();
[183] Fix | Delete
_reason = "";
[184] Fix | Delete
if(jQuery.trim(jQuery("#poptin-deactivation-comment").val()) == "") {
[185] Fix | Delete
jQuery("#alt_plugin").after("<span class='poptin-error-message'>Please provide your feedback</span>");
[186] Fix | Delete
return false;
[187] Fix | Delete
} else {
[188] Fix | Delete
_reason = jQuery.trim(jQuery("#poptin-deactivation-comment").val());
[189] Fix | Delete
}
[190] Fix | Delete
jQuery('[name="poptin-selected-reason"]:checked').val();
[191] Fix | Delete
var email_id = jQuery.trim(jQuery("#poptin-deactivation-email_id").val());
[192] Fix | Delete
$.ajax({
[193] Fix | Delete
url: ajaxurl,
[194] Fix | Delete
type: 'POST',
[195] Fix | Delete
data: {
[196] Fix | Delete
action: 'poptin_plugin_deactivate',
[197] Fix | Delete
reason: _reason,
[198] Fix | Delete
email_id: email_id,
[199] Fix | Delete
nonce: '<?php echo esc_attr(wp_create_nonce("poptin_deactivate_nonce")) ?>'
[200] Fix | Delete
},
[201] Fix | Delete
beforeSend: function () {
[202] Fix | Delete
$(".poptin-spinner").show();
[203] Fix | Delete
$(".poptin-popup-allow-deactivate").attr("disabled", "disabled");
[204] Fix | Delete
}
[205] Fix | Delete
}).done(function () {
[206] Fix | Delete
$(".poptin-spinner").hide();
[207] Fix | Delete
$(".poptin-popup-allow-deactivate").removeAttr("disabled");
[208] Fix | Delete
window.location.href = $("tr[data-slug='" + poptinPluginSlug + "'] .deactivate a").attr('href');
[209] Fix | Delete
});
[210] Fix | Delete
});
[211] Fix | Delete
$('.poptin-popup-skip-feedback').on('click', function (e) {
[212] Fix | Delete
window.location.href = $("tr[data-slug='" + poptinPluginSlug + "'] .deactivate a").attr('href');
[213] Fix | Delete
});
[214] Fix | Delete
function close_popup() {
[215] Fix | Delete
$('.poptin-popup-overlay').removeClass('poptin-active');
[216] Fix | Delete
$('#poptin-deactivate-form').trigger("reset");
[217] Fix | Delete
$(".poptin-popup-allow-deactivate").attr('disabled', 'disabled');
[218] Fix | Delete
$(".poptin-reason-input").hide();
[219] Fix | Delete
$('body').removeClass('poptin-hidden');
[220] Fix | Delete
$('.message.error-message').hide();
[221] Fix | Delete
}
[222] Fix | Delete
});
[223] Fix | Delete
})(jQuery); // This invokes the function above and allows us to use '$' in place of 'jQuery' in our code.
[224] Fix | Delete
</script>
[225] Fix | Delete
[226] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function