PluginProbe ʕ •ᴥ•ʔ
Wordfence Security – Firewall, Malware Scan, and Login Security / 7.11.5
Wordfence Security – Firewall, Malware Scan, and Login Security v7.11.5
8.2.2 8.2.1 8.2.0 3.7.1 3.7.2 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.8.8 3.8.9 3.9.1 4.0.1 4.0.2 4.0.3 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.0.9 5.1.1 5.1.2 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.2.1 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7 5.2.8 5.2.9 5.3.1 5.3.10 5.3.11 5.3.12 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.3.7 5.3.8 5.3.9 6.0.1 6.0.10 6.0.11 6.0.12 6.0.14 6.0.15 6.0.16 6.0.17 6.0.18 6.0.19 6.0.2 6.0.20 6.0.21 6.0.22 6.0.23 6.0.24 6.0.25 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 6.0.8 6.0.9 6.1.1 6.1.10 6.1.11 6.1.12 6.1.14 6.1.15 6.1.16 6.1.17 6.1.2 6.1.3 6.1.4 6.1.5 6.1.6 6.1.7 6.1.8 6.1.9 6.2.0 6.2.1 6.2.10 6.2.2 6.2.3 6.2.4 6.2.5 6.2.6 6.2.7 6.2.8 6.2.9 6.3.0 6.3.1 6.3.10 6.3.11 6.3.12 6.3.14 6.3.15 6.3.16 6.3.17 6.3.18 6.3.19 6.3.2 6.3.20 6.3.21 6.3.22 6.3.3 6.3.4 6.3.5 6.3.6 6.3.7 6.3.8 6.3.9 7.0.1 7.0.2 7.0.3 7.0.4 7.0.5 7.1.0 7.1.1 7.1.10 7.1.11 7.1.12 7.1.14 7.1.15 7.1.16 7.1.17 7.1.18 7.1.19 7.1.2 7.1.20 7.1.3 7.1.4 7.1.5 7.1.6 7.1.7 7.1.8 7.1.9 7.10.0 7.10.1 7.10.2 7.10.3 7.10.4 7.10.5 7.10.6 7.10.7 7.11.0 7.11.1 7.11.2 7.11.3 7.11.4 7.11.5 7.11.6 7.11.7 7.2.1 7.2.2 7.2.3 7.2.4 7.2.5 7.3.1 7.3.2 7.3.3 7.3.4 7.3.5 7.3.6 7.4.0 7.4.1 7.4.10 7.4.11 7.4.12 7.4.14 7.4.2 7.4.3 trunk 7.4.4 1.1 7.4.5 1.2 7.4.6 1.3 7.4.7 1.3.1 7.4.8 1.3.2 7.4.9 1.3.3 7.5.0 1.4.2 7.5.1 1.4.3 7.5.10 1.4.4 7.5.11 1.4.5 7.5.2 1.4.6 7.5.3 1.4.7 7.5.4 1.4.8 7.5.5 1.5.1 7.5.6 1.5.2 7.5.7 1.5.3 7.5.8 1.5.4 7.5.9 1.5.5 7.6.0 1.5.6 7.6.1 2.0.1 7.6.2 2.0.2 7.7.0 2.0.3 7.7.1 2.0.5 7.8.0 2.0.6 7.8.1 2.0.7 7.8.2 2.1.0 7.9.0 2.1.1 7.9.1 2.1.2 7.9.2 2.1.3 7.9.3 2.1.4 8.0.0 2.1.5 8.0.1 3.0.2 8.0.2 3.0.3 8.0.3 3.0.4 8.0.4 3.0.5 8.0.5 3.0.6 8.1.0 3.0.7 8.1.1 3.0.8 8.1.2 3.0.9 8.1.3 3.1.0 8.1.4 3.1.1 v1.4.1 3.1.2 3.1.4 3.1.6 3.2.1 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.4.1 3.4.4 3.4.5 3.5.1 3.5.2 3.6.1 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.6.9
wordfence / views / dashboard / options-group-import.php
wordfence / views / dashboard Last commit date
global-status.php 5 years ago option-howgetips.php 2 years ago options-group-alert.php 5 years ago options-group-dashboard.php 4 years ago options-group-email-summary.php 5 years ago options-group-general.php 3 years ago options-group-import.php 2 years ago options-group-license.php 4 years ago options-group-view-customization.php 5 years ago status-payment-expiring.php 4 years ago status-renewing.php 4 years ago
options-group-import.php
180 lines
1 <?php
2 if (!defined('WORDFENCE_VERSION')) { exit; }
3 /**
4 * Presents the Import/Export Options group.
5 *
6 * Expects $stateKey.
7 *
8 * @var string $stateKey The key under which the collapse state is stored.
9 * @var bool $collapseable If defined, specifies whether or not this grouping can be collapsed. Defaults to true.
10 */
11
12 if (!isset($collapseable)) {
13 $collapseable = true;
14 }
15 ?>
16 <div class="wf-row">
17 <div class="wf-col-xs-12">
18 <div class="wf-block<?php if (!$collapseable) { echo ' wf-always-active'; } else { echo (wfPersistenceController::shared()->isActive($stateKey) ? ' wf-active' : ''); } ?>" data-persistence-key="<?php echo esc_attr($stateKey); ?>">
19 <div class="wf-block-header">
20 <div class="wf-block-header-content">
21 <div class="wf-block-title">
22 <strong><?php esc_html_e('Import/Export Options', 'wordfence'); ?></strong>
23 </div>
24 <?php if ($collapseable): ?><div class="wf-block-header-action"><div class="wf-block-header-action-disclosure" role="checkbox" aria-checked="<?php echo (wfPersistenceController::shared()->isActive($stateKey) ? 'true' : 'false'); ?>" tabindex="0"></div></div><?php endif; ?>
25 </div>
26 </div>
27 <div class="wf-block-content">
28 <ul class="wf-block-list">
29 <li>
30 <ul id="wf-option-exportOptions" class="wf-flex-horizontal wf-flex-vertical-xs wf-flex-full-width wf-add-top wf-add-bottom">
31 <li><?php esc_html_e('Export this site\'s Wordfence options for import on another site', 'wordfence'); ?> <a href="<?php echo wfSupportController::esc_supportURL(wfSupportController::ITEM_DASHBOARD_OPTION_EXPORT); ?>" target="_blank" rel="noopener noreferrer" class="wf-inline-help"><i class="wf-fa wf-fa-question-circle-o" aria-hidden="true"></i><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a></li>
32 <li class="wf-right wf-left-xs wf-padding-add-top-xs-small">
33 <a href="#" class="wf-btn wf-btn-primary wf-btn-callout-subtle" id="wf-export-options" role="button"><?php echo wp_kses(/* translators: word order may be altered as long as HTML remains around "Wordfence" */ __('Export<span class="wf-hidden-xs"> Wordfence</span> Options', 'wordfence'), array('span'=>array('class'=>array()))); ?></a>
34 </li>
35 </ul>
36 </li>
37 <li>
38 <ul id="wf-option-importOptions" class="wf-flex-vertical wf-flex-full-width wf-add-bottom">
39 <li>
40 <ul class="wf-option wf-option-text">
41 <li class="wf-option-content">
42 <ul>
43 <li class="wf-option-title">
44 <?php esc_html_e('Import Wordfence options from another site using a token', 'wordfence'); ?> <a href="<?php echo wfSupportController::esc_supportURL(wfSupportController::ITEM_DASHBOARD_OPTION_IMPORT); ?>" target="_blank" rel="noopener noreferrer" class="wf-inline-help"><i class="wf-fa wf-fa-question-circle-o" aria-hidden="true"></i><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a>
45 </li>
46 <li class="wf-option-text wf-option-full-width wf-no-right">
47 <input type="text" value="" id="wf-import-token">
48 </li>
49 </ul>
50 </li>
51 </ul>
52 </li>
53 <li>
54 <ul class="wf-flex-horizontal wf-flex-full-width">
55 <li class="wf-right wf-left-xs" id="wf-license-controls">
56 <a href="#" class="wf-btn wf-btn-primary wf-btn-callout-subtle wf-disabled" id="wf-import-options" role="button"><?php echo wp_kses(/* translators: word order may be altered as long as HTML remains around "Wordfence" */ __('Import<span class="wf-hidden-xs"> Wordfence</span> Options', 'wordfence'), array('span'=>array('class'=>array()))); ?></a>
57 </li>
58 </ul>
59 </li>
60 </ul>
61 </li>
62 </ul>
63 <script type="application/javascript">
64 (function($) {
65 $(function() {
66 $('#wf-export-options').on('click', function(e) {
67 e.preventDefault();
68 e.stopPropagation();
69
70 WFAD.ajax('wordfence_exportSettings', {}, function(res) {
71 if (res.ok && res.token) {
72 var prompt = $('#wfTmpl_exportPromptSuccess').tmpl(res);
73 var promptHTML = $("<div />").append(prompt).html();
74 WFAD.colorboxHTML((WFAD.isSmallScreen ? '300px' : '400px'), promptHTML, {overlayClose: false, closeButton: false, className: 'wf-modal', onComplete: function() {
75 $('#wf-export-prompt-close').on('click', function(e) {
76 e.preventDefault();
77 e.stopPropagation();
78
79 WFAD.colorboxClose();
80 });
81 }});
82 }
83 else {
84 var prompt = $('#wfTmpl_exportPromptError').tmpl({err: res.err || 'An unknown error occurred during the export. We received an undefined error from your web server.'});
85 var promptHTML = $("<div />").append(prompt).html();
86 WFAD.colorboxHTML((WFAD.isSmallScreen ? '300px' : '400px'), promptHTML, {overlayClose: false, closeButton: false, className: 'wf-modal', onComplete: function() {
87 $('#wf-export-prompt-close').on('click', function(e) {
88 e.preventDefault();
89 e.stopPropagation();
90
91 WFAD.colorboxClose();
92 });
93 }});
94 }
95 });
96 });
97
98 $('#wf-import-token').on('change paste keyup', function() {
99 setTimeout(function() {
100 $('#wf-import-options').toggleClass('wf-disabled', $('#wf-import-token').val() == '');
101 }, 4);
102 });
103
104 $('#wf-import-options').on('click', function(e) {
105 e.preventDefault();
106 e.stopPropagation();
107
108 WFAD.ajax('wordfence_importSettings', {token: $('#wf-import-token').val()}, function(res) {
109 if (res.ok) {
110 var prompt = $('#wfTmpl_importPromptSuccess').tmpl(res);
111 var promptHTML = $("<div />").append(prompt).html();
112 WFAD.colorboxHTML((WFAD.isSmallScreen ? '300px' : '400px'), promptHTML, {overlayClose: false, closeButton: false, className: 'wf-modal', onComplete: function() {
113 $('#wf-import-prompt-reload').on('click', function(e) {
114 e.preventDefault();
115 e.stopPropagation();
116
117 window.location.reload(true);
118 });
119 }});
120 }
121 else {
122 var prompt = $('#wfTmpl_importPromptError').tmpl({err: res.err || 'An unknown error occurred during the import.'});
123 var promptHTML = $("<div />").append(prompt).html();
124 WFAD.colorboxHTML((WFAD.isSmallScreen ? '300px' : '400px'), promptHTML, {overlayClose: false, closeButton: false, className: 'wf-modal', onComplete: function() {
125 $('#wf-import-prompt-close').on('click', function(e) {
126 e.preventDefault();
127 e.stopPropagation();
128
129 WFAD.colorboxClose();
130 });
131 }});
132 }
133 });
134 });
135 });
136 })(jQuery);
137 </script>
138 </div>
139 </div>
140 </div>
141 </div> <!-- end import options -->
142 <script type="text/x-jquery-template" id="wfTmpl_exportPromptSuccess">
143 <?php
144 echo wfView::create('common/modal-prompt', array(
145 'title' => __('Export Successful', 'wordfence'),
146 'messageHTML' => '<p>' . esc_html__('We successfully exported your site options. To import your site options on another site, copy and paste the token below into the import text box on the destination site. Keep this token secret &mdash; it is like a password. If anyone else discovers the token it will allow them to import your options excluding your license.', 'wordfence') . '</p><p><input type="text" class="wf-full-width" value="${token}" onclick="this.select();" /></p>',
147 'primaryButton' => array('id' => 'wf-export-prompt-close', 'label' => __('Close', 'wordfence'), 'link' => '#'),
148 ))->render();
149 ?>
150 </script>
151
152 <script type="text/x-jquery-template" id="wfTmpl_exportPromptError">
153 <?php
154 echo wfView::create('common/modal-prompt', array(
155 'title' => __('Error during Export', 'wordfence'),
156 'message' => '${err}',
157 'primaryButton' => array('id' => 'wf-export-prompt-close', 'label' => __('Close', 'wordfence'), 'link' => '#'),
158 ))->render();
159 ?>
160 </script>
161
162 <script type="text/x-jquery-template" id="wfTmpl_importPromptSuccess">
163 <?php
164 echo wfView::create('common/modal-prompt', array(
165 'title' => __('Import Successful', 'wordfence'),
166 'messageHTML' => esc_html__('We successfully imported the site options.', 'wordfence'),
167 'primaryButton' => array('id' => 'wf-import-prompt-reload', 'label' => __('Reload', 'wordfence'), 'link' => '#'),
168 ))->render();
169 ?>
170 </script>
171
172 <script type="text/x-jquery-template" id="wfTmpl_importPromptError">
173 <?php
174 echo wfView::create('common/modal-prompt', array(
175 'title' => __('Error during Import', 'wordfence'),
176 'message' => '${err}',
177 'primaryButton' => array('id' => 'wf-import-prompt-close', 'label' => __('Close', 'wordfence'), 'link' => '#'),
178 ))->render();
179 ?>
180 </script>