Version Description
- July 19, 2021 =
- Fix: WooCommerce integration notice can now be dismissed on any admin page
- Change: Updated messaging around 2FA for WooCommerce roles
Download this release
Release Info
Developer | wfalexk |
Plugin | Wordfence Login Security |
Version | 1.0.8 |
Comparing to | |
See all releases |
Code changes from version 1.0.7 to 1.0.8
- classes/controller/notices.php +11 -1
- classes/controller/wordfencels.php +5 -5
- css/{admin-global.1625749951.css → admin-global.1626705446.css} +0 -0
- css/{admin.1625749951.css → admin.1626705446.css} +0 -0
- css/{colorbox.1625749951.css → colorbox.1626705446.css} +0 -0
- css/{font-awesome.1625749951.css → font-awesome.1626705446.css} +0 -0
- css/{ionicons.1625749951.css → ionicons.1626705446.css} +0 -0
- css/{jquery-ui.min.1625749951.css → jquery-ui.min.1626705446.css} +0 -0
- css/{jquery-ui.structure.min.1625749951.css → jquery-ui.structure.min.1626705446.css} +0 -0
- css/{jquery-ui.theme.min.1625749951.css → jquery-ui.theme.min.1626705446.css} +0 -0
- css/{login.1625749951.css → login.1626705446.css} +0 -0
- css/{wfselect2.min.1625749951.css → wfselect2.min.1626705446.css} +0 -0
- js/{Chart.bundle.min.1625749951.js → Chart.bundle.min.1626705446.js} +0 -0
- js/{admin-global.1625749951.js → admin-global.1626705446.js} +7 -0
- js/{admin.1625749951.js → admin.1626705446.js} +0 -7
- js/{jquery.colorbox.1625749951.js → jquery.colorbox.1626705446.js} +0 -0
- js/{jquery.colorbox.min.1625749951.js → jquery.colorbox.min.1626705446.js} +0 -0
- js/{jquery.qrcode.min.1625749951.js → jquery.qrcode.min.1626705446.js} +0 -0
- js/{jquery.tmpl.min.1625749951.js → jquery.tmpl.min.1626705446.js} +0 -0
- js/{login.1625749951.js → login.1626705446.js} +0 -0
- js/{wfselect2.min.1625749951.js → wfselect2.min.1626705446.js} +0 -0
- readme.txt +5 -1
- views/options/option-roles.php +1 -1
- wordfence-login-security.php +3 -3
classes/controller/notices.php
CHANGED
@@ -21,6 +21,8 @@ class Controller_Notices {
|
|
21 |
}
|
22 |
return $_shared;
|
23 |
}
|
|
|
|
|
24 |
|
25 |
/**
|
26 |
* Adds an admin notice to the display queue. If $user is provided, it will show only for that user, otherwise it
|
@@ -95,7 +97,7 @@ class Controller_Notices {
|
|
95 |
*/
|
96 |
public function has_notice($user) {
|
97 |
$notices = $this->_notices($user);
|
98 |
-
return !!count($notices);
|
99 |
}
|
100 |
|
101 |
/**
|
@@ -176,6 +178,14 @@ class Controller_Notices {
|
|
176 |
return self::PERSISTENT_NOTICE_DISMISS_PREFIX . $noticeId;
|
177 |
}
|
178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
public function dismiss_persistent_notice($userId, $noticeId) {
|
180 |
if (!in_array($noticeId, $this->get_persistent_notice_ids(), true))
|
181 |
return false;
|
21 |
}
|
22 |
return $_shared;
|
23 |
}
|
24 |
+
|
25 |
+
private $persistentNotices = array();
|
26 |
|
27 |
/**
|
28 |
* Adds an admin notice to the display queue. If $user is provided, it will show only for that user, otherwise it
|
97 |
*/
|
98 |
public function has_notice($user) {
|
99 |
$notices = $this->_notices($user);
|
100 |
+
return !!count($notices) || $this->has_persistent_notices();
|
101 |
}
|
102 |
|
103 |
/**
|
178 |
return self::PERSISTENT_NOTICE_DISMISS_PREFIX . $noticeId;
|
179 |
}
|
180 |
|
181 |
+
public function register_persistent_notice($noticeId) {
|
182 |
+
$this->persistentNotices[] = $noticeId;
|
183 |
+
}
|
184 |
+
|
185 |
+
public function has_persistent_notices() {
|
186 |
+
return count($this->persistentNotices) > 0;
|
187 |
+
}
|
188 |
+
|
189 |
public function dismiss_persistent_notice($userId, $noticeId) {
|
190 |
if (!in_array($noticeId, $this->get_persistent_notice_ids(), true))
|
191 |
return false;
|
classes/controller/wordfencels.php
CHANGED
@@ -145,7 +145,10 @@ END
|
|
145 |
}
|
146 |
|
147 |
if ($this->has_woocommerce() && !Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_ENABLE_WOOCOMMERCE_INTEGRATION)) {
|
148 |
-
|
|
|
|
|
|
|
149 |
}
|
150 |
}
|
151 |
}
|
@@ -163,11 +166,8 @@ END
|
|
163 |
}
|
164 |
|
165 |
public function _woocommerce_integration_notice() {
|
166 |
-
$id = Controller_Notices::PERSISTENT_NOTICE_WOOCOMMERCE_INTEGRATION;
|
167 |
-
if (Controller_Notices::shared()->is_persistent_notice_dismissed(get_current_user_id(), $id))
|
168 |
-
return;
|
169 |
?>
|
170 |
-
<div id="<?php echo esc_attr(
|
171 |
<p>
|
172 |
<?php esc_html_e('WooCommerce appears to be installed, but the Wordfence Login Security WooCommerce integration is not currently enabled. Without this feature, WooCommerce forms will not support all functionality provided by Wordfence Login Security, including CAPTCHA for the login page and user registration.', 'wordfence-2fa'); ?>
|
173 |
<a href="<?php echo esc_attr(esc_url(network_admin_url('admin.php?page=WFLS#top#settings'))) ?>"><?php esc_html_e('Manage Settings', 'wordfence-2fa') ?></a>
|
145 |
}
|
146 |
|
147 |
if ($this->has_woocommerce() && !Controller_Settings::shared()->get_bool(Controller_Settings::OPTION_ENABLE_WOOCOMMERCE_INTEGRATION)) {
|
148 |
+
if (!Controller_Notices::shared()->is_persistent_notice_dismissed(get_current_user_id(), Controller_Notices::PERSISTENT_NOTICE_WOOCOMMERCE_INTEGRATION)) {
|
149 |
+
Controller_Notices::shared()->register_persistent_notice(Controller_Notices::PERSISTENT_NOTICE_WOOCOMMERCE_INTEGRATION);
|
150 |
+
add_action(is_multisite() ? 'network_admin_notices' : 'admin_notices', array($this, '_woocommerce_integration_notice'));
|
151 |
+
}
|
152 |
}
|
153 |
}
|
154 |
}
|
166 |
}
|
167 |
|
168 |
public function _woocommerce_integration_notice() {
|
|
|
|
|
|
|
169 |
?>
|
170 |
+
<div id="<?php echo esc_attr(Controller_Notices::PERSISTENT_NOTICE_WOOCOMMERCE_INTEGRATION) ?>" class="notice notice-warning is-dismissible wfls-persistent-notice">
|
171 |
<p>
|
172 |
<?php esc_html_e('WooCommerce appears to be installed, but the Wordfence Login Security WooCommerce integration is not currently enabled. Without this feature, WooCommerce forms will not support all functionality provided by Wordfence Login Security, including CAPTCHA for the login page and user registration.', 'wordfence-2fa'); ?>
|
173 |
<a href="<?php echo esc_attr(esc_url(network_admin_url('admin.php?page=WFLS#top#settings'))) ?>"><?php esc_html_e('Manage Settings', 'wordfence-2fa') ?></a>
|
css/{admin-global.1625749951.css → admin-global.1626705446.css}
RENAMED
File without changes
|
css/{admin.1625749951.css → admin.1626705446.css}
RENAMED
File without changes
|
css/{colorbox.1625749951.css → colorbox.1626705446.css}
RENAMED
File without changes
|
css/{font-awesome.1625749951.css → font-awesome.1626705446.css}
RENAMED
File without changes
|
css/{ionicons.1625749951.css → ionicons.1626705446.css}
RENAMED
File without changes
|
css/{jquery-ui.min.1625749951.css → jquery-ui.min.1626705446.css}
RENAMED
File without changes
|
css/{jquery-ui.structure.min.1625749951.css → jquery-ui.structure.min.1626705446.css}
RENAMED
File without changes
|
css/{jquery-ui.theme.min.1625749951.css → jquery-ui.theme.min.1626705446.css}
RENAMED
File without changes
|
css/{login.1625749951.css → login.1626705446.css}
RENAMED
File without changes
|
css/{wfselect2.min.1625749951.css → wfselect2.min.1626705446.css}
RENAMED
File without changes
|
js/{Chart.bundle.min.1625749951.js → Chart.bundle.min.1626705446.js}
RENAMED
File without changes
|
js/{admin-global.1625749951.js → admin-global.1626705446.js}
RENAMED
@@ -2,6 +2,13 @@
|
|
2 |
window['GWFLS'] = {
|
3 |
init: function() {
|
4 |
this.register_create_user_events();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
},
|
6 |
|
7 |
/**
|
2 |
window['GWFLS'] = {
|
3 |
init: function() {
|
4 |
this.register_create_user_events();
|
5 |
+
|
6 |
+
$('.wfls-persistent-notice').on('click', 'button', function() {
|
7 |
+
GWFLS.ajax(
|
8 |
+
'wordfence_ls_dismiss_persistent_notice',
|
9 |
+
{notice_id: $(this).parent('.notice').attr('id')},
|
10 |
+
);
|
11 |
+
});
|
12 |
},
|
13 |
|
14 |
/**
|
js/{admin.1625749951.js → admin.1626705446.js}
RENAMED
@@ -537,13 +537,6 @@
|
|
537 |
WFLS.pendingChanges = {};
|
538 |
WFLS.updatePendingChanges();
|
539 |
});
|
540 |
-
|
541 |
-
$('.wfls-persistent-notice').on('click', 'button', function() {
|
542 |
-
WFLS.ajax(
|
543 |
-
'wordfence_ls_dismiss_persistent_notice',
|
544 |
-
{notice_id: $(this).parent('.notice').attr('id')},
|
545 |
-
);
|
546 |
-
});
|
547 |
},
|
548 |
|
549 |
updatePendingChanges: function() {
|
537 |
WFLS.pendingChanges = {};
|
538 |
WFLS.updatePendingChanges();
|
539 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
540 |
},
|
541 |
|
542 |
updatePendingChanges: function() {
|
js/{jquery.colorbox.1625749951.js → jquery.colorbox.1626705446.js}
RENAMED
File without changes
|
js/{jquery.colorbox.min.1625749951.js → jquery.colorbox.min.1626705446.js}
RENAMED
File without changes
|
js/{jquery.qrcode.min.1625749951.js → jquery.qrcode.min.1626705446.js}
RENAMED
File without changes
|
js/{jquery.tmpl.min.1625749951.js → jquery.tmpl.min.1626705446.js}
RENAMED
File without changes
|
js/{login.1625749951.js → login.1626705446.js}
RENAMED
File without changes
|
js/{wfselect2.min.1625749951.js → wfselect2.min.1626705446.js}
RENAMED
File without changes
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: security, login security, 2fa, two factor authentication, captcha, xml-rpc
|
|
4 |
Requires at least: 4.5
|
5 |
Requires PHP: 5.3
|
6 |
Tested up to: 5.8
|
7 |
-
Stable tag: 1.0.
|
8 |
|
9 |
Secure your website with Wordfence Login Security, providing two-factor authentication, login and registration CAPTCHA, and XML-RPC protection.
|
10 |
|
@@ -58,6 +58,10 @@ Secure your website with Wordfence Login Security.
|
|
58 |
|
59 |
== Changelog ==
|
60 |
|
|
|
|
|
|
|
|
|
61 |
= 1.0.7 - July 8, 2021 =
|
62 |
* Improvement: Added 2FA and reCAPTCHA support for WooCommerce login and registration forms
|
63 |
* Improvement: Added option to require 2FA for any role
|
4 |
Requires at least: 4.5
|
5 |
Requires PHP: 5.3
|
6 |
Tested up to: 5.8
|
7 |
+
Stable tag: 1.0.8
|
8 |
|
9 |
Secure your website with Wordfence Login Security, providing two-factor authentication, login and registration CAPTCHA, and XML-RPC protection.
|
10 |
|
58 |
|
59 |
== Changelog ==
|
60 |
|
61 |
+
= 1.0.8 - July 19, 2021 =
|
62 |
+
* Fix: WooCommerce integration notice can now be dismissed on any admin page
|
63 |
+
* Change: Updated messaging around 2FA for WooCommerce roles
|
64 |
+
|
65 |
= 1.0.7 - July 8, 2021 =
|
66 |
* Improvement: Added 2FA and reCAPTCHA support for WooCommerce login and registration forms
|
67 |
* Improvement: Added option to require 2FA for any role
|
views/options/option-roles.php
CHANGED
@@ -45,7 +45,7 @@ foreach ($options as $option) {
|
|
45 |
<?php endforeach ?>
|
46 |
</ul>
|
47 |
<?php if ($hasWoocommerce): ?>
|
48 |
-
<p><?php esc_html_e('By default, the customer role provided by WooCommerce does not have access to admin pages and therefore users in this role cannot configure two-factor authentication at this time.', 'wordfence-2fa') ?></p>
|
49 |
<?php endif ?>
|
50 |
</li>
|
51 |
<li class="wfls-2fa-grace-period-container">
|
45 |
<?php endforeach ?>
|
46 |
</ul>
|
47 |
<?php if ($hasWoocommerce): ?>
|
48 |
+
<p><?php esc_html_e('By default, the customer role provided by WooCommerce does not have access to admin pages and therefore users in this role cannot configure two-factor authentication at this time. A 2FA setup process will be available for the customer role in an upcoming release.', 'wordfence-2fa') ?></p>
|
49 |
<?php endif ?>
|
50 |
</li>
|
51 |
<li class="wfls-2fa-grace-period-container">
|
wordfence-login-security.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Wordfence Login Security
|
|
4 |
Description: Wordfence Login Security
|
5 |
Author: Wordfence
|
6 |
Author URI: http://www.wordfence.com/
|
7 |
-
Version: 1.0.
|
8 |
Network: true
|
9 |
Requires at least: 4.5
|
10 |
Requires PHP: 5.3
|
@@ -35,8 +35,8 @@ if ($wfCoreActive && !(isset($wfCoreLoading) && $wfCoreLoading)) {
|
|
35 |
else {
|
36 |
define('WORDFENCE_LS_FROM_CORE', ($wfCoreActive && isset($wfCoreLoading) && $wfCoreLoading));
|
37 |
|
38 |
-
define('WORDFENCE_LS_VERSION', '1.0.
|
39 |
-
define('WORDFENCE_LS_BUILD_NUMBER', '
|
40 |
|
41 |
define('WORDFENCE_LS_PLUGIN_BASENAME', plugin_basename(__FILE__));
|
42 |
|
4 |
Description: Wordfence Login Security
|
5 |
Author: Wordfence
|
6 |
Author URI: http://www.wordfence.com/
|
7 |
+
Version: 1.0.8
|
8 |
Network: true
|
9 |
Requires at least: 4.5
|
10 |
Requires PHP: 5.3
|
35 |
else {
|
36 |
define('WORDFENCE_LS_FROM_CORE', ($wfCoreActive && isset($wfCoreLoading) && $wfCoreLoading));
|
37 |
|
38 |
+
define('WORDFENCE_LS_VERSION', '1.0.8');
|
39 |
+
define('WORDFENCE_LS_BUILD_NUMBER', '1626705446');
|
40 |
|
41 |
define('WORDFENCE_LS_PLUGIN_BASENAME', plugin_basename(__FILE__));
|
42 |
|