PluginProbe ʕ •ᴥ•ʔ
Image Widget / 4.2
Image Widget v4.2
trunk 1.0 2.0 2.1 2.2 2.2.1 2.2.2 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.2 3.2.1 3.2.10 3.2.11 3.2.2 3.2.3 3.2.4 3.2.5 3.2.7 3.2.8 3.2.9 3.3 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 4.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.0.8 4.0.9 4.1 4.1.1 4.1.2 4.2 4.2.1 4.2.2 4.3 4.3.1 4.4 4.4.1 4.4.11 4.4.12 4.4.2 4.4.3 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9
image-widget / freemius / templates / firewall-issues-js.php
image-widget / freemius / templates Last commit date
plugin-info 10 years ago account.php 10 years ago add-ons.php 10 years ago admin-notice.php 10 years ago all-admin-notice.php 10 years ago checkout.php 10 years ago connect.php 10 years ago contact.php 10 years ago deactivation-feedback-modal.php 10 years ago debug.php 10 years ago email.php 10 years ago firewall-issues-js.php 10 years ago pending-activation.php 10 years ago plugin-icon.php 10 years ago powered-by.php 10 years ago pricing.php 10 years ago sticky-admin-notice-js.php 10 years ago
firewall-issues-js.php
49 lines
1 <?php
2 /**
3 * API connectivity issues (CloudFlare's firewall) handler for handling different
4 * scenarios selected by the user after connectivity issue is detected, by sending
5 * AJAX call to the server in order to make the actual actions.
6 *
7 * @package Freemius
8 * @copyright Copyright (c) 2015, Freemius, Inc.
9 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
10 * @since 1.0.9
11 */
12 ?>
13 <script type="text/javascript">
14 jQuery(document).ready(function ($) {
15 $('#fs_firewall_issue_options a.fs-resolve').click(function () {
16 var
17 error_type = $(this).attr('data-type'),
18 notice = $(this).parents('.fs-notice'),
19 slug = notice.attr('data-slug');
20
21 var data = {
22 action : slug + '_resolve_firewall_issues',
23 slug : slug,
24 error_type: error_type
25 };
26
27 if ('squid' === error_type) {
28 data.hosting_company = prompt('What is the name or URL of your hosting company?');
29 if (null == data.hosting_company)
30 return false;
31
32 if ('' === data.hosting_company) {
33 alert('We won\'t be able to help without knowing your hosting company.');
34 return false;
35 }
36 }
37
38 $(this).css({'cursor': 'wait'});
39
40 // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
41 $.post(ajaxurl, data, function (response) {
42 if (1 == response) {
43 // Refresh page on success.
44 location.reload();
45 }
46 });
47 });
48 });
49 </script>