Version Description
FIXED: (CSRF) Security fix. Special thanks to Muhammad Daffa (Patchstack Alliance) for reporting this.
Download this release
Release Info
Developer | Virgial |
Plugin | Manage Notification E-mails |
Version | 1.8.3 |
Comparing to | |
See all releases |
Code changes from version 1.8.2 to 1.8.3
manage-notification-emails.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Manage Notification E-mails
|
4 |
-
Plugin URI: https://www.freeamigos.nl/wp-plugins/manage-notification-emails/1.8.
|
5 |
Description: This plugin gives you the option to disable some of the notification e-mails send by WordPress. It's a simple plugin but effective.
|
6 |
-
Version: 1.8.
|
7 |
Author: Virgial Berveling
|
8 |
Author URI: https://www.freeamigos.nl
|
9 |
Text Domain: manage-notification-emails
|
@@ -60,7 +60,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
60 |
die();
|
61 |
}
|
62 |
|
63 |
-
define( 'FA_MNE_VERSION', '1.8.
|
64 |
define( 'FA_MNE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
65 |
define( 'FA_MNE_PLUGIN_DIR', untrailingslashit( dirname( __FILE__ ) ) );
|
66 |
define( 'FA_MNE_SLUG', 'manage-notification-emails' );
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Manage Notification E-mails
|
4 |
+
Plugin URI: https://www.freeamigos.nl/wp-plugins/manage-notification-emails/1.8.3
|
5 |
Description: This plugin gives you the option to disable some of the notification e-mails send by WordPress. It's a simple plugin but effective.
|
6 |
+
Version: 1.8.3
|
7 |
Author: Virgial Berveling
|
8 |
Author URI: https://www.freeamigos.nl
|
9 |
Text Domain: manage-notification-emails
|
60 |
die();
|
61 |
}
|
62 |
|
63 |
+
define( 'FA_MNE_VERSION', '1.8.3' );
|
64 |
define( 'FA_MNE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
65 |
define( 'FA_MNE_PLUGIN_DIR', untrailingslashit( dirname( __FILE__ ) ) );
|
66 |
define( 'FA_MNE_SLUG', 'manage-notification-emails' );
|
modules/settings-page/class.FAMNESettingsPage.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
* @author Virgial Berveling
|
13 |
* @copyright 2006-2015
|
14 |
*
|
15 |
-
* version: 1.3.
|
16 |
*/
|
17 |
|
18 |
if ( ! class_exists( 'FAMNESettingsPage' ) ) :
|
@@ -145,6 +145,10 @@ if ( ! class_exists( 'FAMNESettingsPage' ) ) :
|
|
145 |
array( $this, 'print_section_info' ), // Callback.
|
146 |
self::MENU_SLUG // Page.
|
147 |
);
|
|
|
|
|
|
|
|
|
148 |
}
|
149 |
|
150 |
/**
|
@@ -261,6 +265,31 @@ if ( ! class_exists( 'FAMNESettingsPage' ) ) :
|
|
261 |
}
|
262 |
}
|
263 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
/**
|
265 |
* Print admin_page
|
266 |
*
|
@@ -270,23 +299,6 @@ if ( ! class_exists( 'FAMNESettingsPage' ) ) :
|
|
270 |
global $famne_options;
|
271 |
global $pagenow;
|
272 |
|
273 |
-
if ( ! empty( $_GET['famne_reset'] ) ) :
|
274 |
-
if ( strval( $_GET['famne_reset'] ) === '1' ) :
|
275 |
-
if ( self::is_famne_settings_page() ) :
|
276 |
-
delete_option( 'fa_mne_version' );
|
277 |
-
delete_option( 'famne_options' );
|
278 |
-
FAMNE::install();
|
279 |
-
echo "<script>document.location='options-general.php?page=famne-admin&famne_reset=2'</script>";
|
280 |
-
elseif ( self::is_famne_network_settings_page() ) :
|
281 |
-
delete_site_option( 'fa_mne_version' );
|
282 |
-
delete_site_option( 'famne_options' );
|
283 |
-
FAMNE::install();
|
284 |
-
echo "<script>document.location='options-general.php?page=famne-admin&famne_reset=2'</script>";
|
285 |
-
endif;
|
286 |
-
exit;
|
287 |
-
endif;
|
288 |
-
endif;
|
289 |
-
|
290 |
$famne_options = FAMNE::get_option( 'famne_options' );
|
291 |
|
292 |
foreach ( $this->tabs as $key => $tab ) :
|
12 |
* @author Virgial Berveling
|
13 |
* @copyright 2006-2015
|
14 |
*
|
15 |
+
* version: 1.3.1
|
16 |
*/
|
17 |
|
18 |
if ( ! class_exists( 'FAMNESettingsPage' ) ) :
|
145 |
array( $this, 'print_section_info' ), // Callback.
|
146 |
self::MENU_SLUG // Page.
|
147 |
);
|
148 |
+
|
149 |
+
if ( isset( $_GET['famne_reset'] ) && strval( $_GET['famne_reset'] ) === '1' ) {
|
150 |
+
$this->reset_settings();
|
151 |
+
}
|
152 |
}
|
153 |
|
154 |
/**
|
265 |
}
|
266 |
}
|
267 |
|
268 |
+
private function reset_settings()
|
269 |
+
{
|
270 |
+
if ( ! isset ( $_GET['famne_reset'] ) || strval( $_GET['famne_reset'] ) !== '1' || ! isset( $_GET['nonce'] ) ):
|
271 |
+
return;
|
272 |
+
endif;
|
273 |
+
|
274 |
+
if ( ! wp_verify_nonce( $_GET['nonce'], 'famne_reset' )) :
|
275 |
+
wp_nonce_ays( '' );
|
276 |
+
die();
|
277 |
+
endif;
|
278 |
+
|
279 |
+
if ( self::is_famne_settings_page() ) :
|
280 |
+
delete_option( 'fa_mne_version' );
|
281 |
+
delete_option( 'famne_options' );
|
282 |
+
FAMNE::install();
|
283 |
+
echo "<script>document.location='" . admin_url( 'options-general.php?page=famne-admin&updated=1' ) . "'</script>";
|
284 |
+
elseif ( self::is_famne_network_settings_page() ) :
|
285 |
+
delete_site_option( 'fa_mne_version' );
|
286 |
+
delete_site_option( 'famne_options' );
|
287 |
+
FAMNE::install();
|
288 |
+
echo "<script>document.location='" . admin_url( 'network/settings.php?page=famne-network-admin&updated=1' ) . "'</script>";
|
289 |
+
endif;
|
290 |
+
exit;
|
291 |
+
}
|
292 |
+
|
293 |
/**
|
294 |
* Print admin_page
|
295 |
*
|
299 |
global $famne_options;
|
300 |
global $pagenow;
|
301 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
$famne_options = FAMNE::get_option( 'famne_options' );
|
303 |
|
304 |
foreach ( $this->tabs as $key => $tab ) :
|
modules/settings-page/views/settings.php
CHANGED
@@ -11,6 +11,7 @@
|
|
11 |
* @copyright 2006-2015
|
12 |
*
|
13 |
* since: 1.3.0
|
|
|
14 |
*/
|
15 |
|
16 |
if ( ! defined( 'ABSPATH' ) || ! class_exists( 'FAMNESettingsPage', false ) ) {
|
@@ -51,7 +52,7 @@ if ( is_multisite() && ! FAMNE::network_managed() ) {
|
|
51 |
}
|
52 |
print_checkbox( $famne_options, 'wp_password_change_notification', __( 'Password change notification to admin', 'manage-notification-emails' ), __( 'Send e-mail to the blog admin of a user changing his or her password.', 'manage-notification-emails' ) );
|
53 |
|
54 |
-
print_checkbox( $famne_options, 'auto_core_update_send_email', __( '
|
55 |
print_checkbox( $famne_options, 'auto_plugin_update_send_email', __( 'Automatic WordPress plugin update e-mail', 'manage-notification-emails' ), __( 'Sends an e-mail after a successful automatic plugin update to administrators. E-mails about failed plugin updates will always be sent to the administrators', 'manage-notification-emails' ) );
|
56 |
print_checkbox( $famne_options, 'auto_theme_update_send_email', __( 'Automatic WordPress theme update e-mail', 'manage-notification-emails' ), __( 'Sends an e-mail after a successful automatic theme update to administrators. E-mails about failed theme updates will always be sent to the administrators', 'manage-notification-emails' ) );
|
57 |
print_end_table_form();
|
@@ -66,9 +67,12 @@ if ( is_multisite() && ! FAMNE::network_managed() ) {
|
|
66 |
</div>
|
67 |
<p style="float:right"><a href="#" onclick="resetToDefaults();return false" class="button"><?php _e( 'Reset settings', 'manage-notification-emails' ); ?></a></p>
|
68 |
</div>
|
|
|
|
|
|
|
69 |
<script>
|
70 |
function resetToDefaults(){
|
71 |
var r = confirm('reset to default settings?');
|
72 |
-
if (r == true) document.location='
|
73 |
}
|
74 |
</script>
|
11 |
* @copyright 2006-2015
|
12 |
*
|
13 |
* since: 1.3.0
|
14 |
+
* version: 1.3.1
|
15 |
*/
|
16 |
|
17 |
if ( ! defined( 'ABSPATH' ) || ! class_exists( 'FAMNESettingsPage', false ) ) {
|
52 |
}
|
53 |
print_checkbox( $famne_options, 'wp_password_change_notification', __( 'Password change notification to admin', 'manage-notification-emails' ), __( 'Send e-mail to the blog admin of a user changing his or her password.', 'manage-notification-emails' ) );
|
54 |
|
55 |
+
print_checkbox( $famne_options, 'auto_core_update_send_email', __( 'Automatic WordPress core update e-mail', 'manage-notification-emails' ), __( 'Sends an e-mail after a successful automatic WordPress core update to administrators. E-mails about failed updates will always be sent to the administrators and cannot be disabled.', 'manage-notification-emails' ) );
|
56 |
print_checkbox( $famne_options, 'auto_plugin_update_send_email', __( 'Automatic WordPress plugin update e-mail', 'manage-notification-emails' ), __( 'Sends an e-mail after a successful automatic plugin update to administrators. E-mails about failed plugin updates will always be sent to the administrators', 'manage-notification-emails' ) );
|
57 |
print_checkbox( $famne_options, 'auto_theme_update_send_email', __( 'Automatic WordPress theme update e-mail', 'manage-notification-emails' ), __( 'Sends an e-mail after a successful automatic theme update to administrators. E-mails about failed theme updates will always be sent to the administrators', 'manage-notification-emails' ) );
|
58 |
print_end_table_form();
|
67 |
</div>
|
68 |
<p style="float:right"><a href="#" onclick="resetToDefaults();return false" class="button"><?php _e( 'Reset settings', 'manage-notification-emails' ); ?></a></p>
|
69 |
</div>
|
70 |
+
<?php
|
71 |
+
$admin_page = FAMNESettingsPage::is_famne_network_settings_page() ? 'network/settings.php?page=famne-network-admin&famne_reset=1' : 'options-general.php?page=famne-admin&famne_reset=1';
|
72 |
+
$reset_url = str_replace( '&', '&', wp_nonce_url( admin_url( $admin_page ), 'famne_reset', 'nonce') ) . '#settings';?>
|
73 |
<script>
|
74 |
function resetToDefaults(){
|
75 |
var r = confirm('reset to default settings?');
|
76 |
+
if (r == true) document.location='<?php echo $reset_url; ?>';
|
77 |
}
|
78 |
</script>
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: virgial
|
|
3 |
Tags: notification,notify,email,user,password,moderator,postauthor,automatic updates,admin e-mail,switch
|
4 |
Requires at least: 4.0.0
|
5 |
Donate link:https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TYG56SLWNG42N
|
6 |
-
Tested up to: 6.0.
|
7 |
-
Stable tag: 1.8.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -74,6 +74,9 @@ Some other plugins also use their custom notifications which overwrite the core
|
|
74 |
If you're one of the early installers, than you'll be happy to see that de new user notification is now splitted in admin and user e-mail management.
|
75 |
|
76 |
== Changelog ==
|
|
|
|
|
|
|
77 |
= 1.8.2 =
|
78 |
FIXED: fixed an issue with automatic plugin update notification.
|
79 |
FIXED: fixed issues with not correct activating options in multisite environment.
|
3 |
Tags: notification,notify,email,user,password,moderator,postauthor,automatic updates,admin e-mail,switch
|
4 |
Requires at least: 4.0.0
|
5 |
Donate link:https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TYG56SLWNG42N
|
6 |
+
Tested up to: 6.0.2
|
7 |
+
Stable tag: 1.8.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
74 |
If you're one of the early installers, than you'll be happy to see that de new user notification is now splitted in admin and user e-mail management.
|
75 |
|
76 |
== Changelog ==
|
77 |
+
= 1.8.3 =
|
78 |
+
FIXED: (CSRF) Security fix. Special thanks to Muhammad Daffa (Patchstack Alliance) for reporting this.
|
79 |
+
|
80 |
= 1.8.2 =
|
81 |
FIXED: fixed an issue with automatic plugin update notification.
|
82 |
FIXED: fixed issues with not correct activating options in multisite environment.
|