Manage Notification E-mails - Version 1.4.1

Version Description

ADDED: Manage sending e-mail after a successful automatic Wordpress core update to administrators. E-mails about failed updates will always be sent to the administrators and will not be disabled.

Download this release

Release Info

Developer Virgial
Plugin Icon 128x128 Manage Notification E-mails
Version 1.4.1
Comparing to
See all releases

Code changes from version 1.4.0 to 1.4.1

includes/class.FAMNESettingsPage.php CHANGED
@@ -12,7 +12,7 @@
12
  * @author Virgial Berveling
13
  * @copyright 2006-2015
14
  *
15
- * version: 1.2.0
16
  */
17
 
18
 
@@ -173,6 +173,14 @@ class FAMNESettingsPage
173
  'setting_section_id'
174
  );
175
 
 
 
 
 
 
 
 
 
176
 
177
  }
178
 
@@ -257,6 +265,11 @@ class FAMNESettingsPage
257
  public function field9_callback()
258
  {
259
  $this->print_checkbox('field9','send_password_admin_forgotten_email',__('Send the forgotten password e-mail to administrators. Okay, this is a <strong style="color:#900">DANGEROUS OPTION !</strong><br/> So be warned, because unchecking this option prevents sending out the forgotten password e-mail to all administrators. So hold on to your own password and uncheck this one at your own risk ;-)','manage-notification-emails'));
 
 
 
 
 
260
  }
261
 
262
  public function update_check()
@@ -279,7 +292,8 @@ class FAMNESettingsPage
279
  'send_password_change_email' => '1',
280
  'send_email_change_email' => '1',
281
  'send_password_forgotten_email' => '1',
282
- 'send_password_admin_forgotten_email' => '1'
 
283
  );
284
 
285
  update_option('famne_options',$options);
@@ -301,6 +315,17 @@ class FAMNESettingsPage
301
  }
302
 
303
 
 
 
 
 
 
 
 
 
 
 
 
304
 
305
  /** update 1.0 to 1.1 fix:
306
  * update general wp_new_user_notification option into splitted options
12
  * @author Virgial Berveling
13
  * @copyright 2006-2015
14
  *
15
+ * version: 1.3.0
16
  */
17
 
18
 
173
  'setting_section_id'
174
  );
175
 
176
+ add_settings_field(
177
+ 'auto_core_update_send_email',
178
+ __('automatic Wordpress core update e-mail','manage-notification-emails'),
179
+ array( $this, 'field10_callback' ),
180
+ 'famne-admin',
181
+ 'setting_section_id'
182
+ );
183
+
184
 
185
  }
186
 
265
  public function field9_callback()
266
  {
267
  $this->print_checkbox('field9','send_password_admin_forgotten_email',__('Send the forgotten password e-mail to administrators. Okay, this is a <strong style="color:#900">DANGEROUS OPTION !</strong><br/> So be warned, because unchecking this option prevents sending out the forgotten password e-mail to all administrators. So hold on to your own password and uncheck this one at your own risk ;-)','manage-notification-emails'));
268
+ }
269
+
270
+ public function field10_callback()
271
+ {
272
+ $this->print_checkbox('field10','auto_core_update_send_email',__('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'));
273
  }
274
 
275
  public function update_check()
292
  'send_password_change_email' => '1',
293
  'send_email_change_email' => '1',
294
  'send_password_forgotten_email' => '1',
295
+ 'send_password_admin_forgotten_email' => '1',
296
+ 'auto_core_update_send_email' => '1'
297
  );
298
 
299
  update_option('famne_options',$options);
315
  }
316
 
317
 
318
+ /** update to 1.4.1
319
+ * setting the newly added options to checked as default
320
+ */
321
+
322
+ if (!isset($this->options['auto_core_update_send_email']))
323
+ {
324
+ $this->options['auto_core_update_send_email'] ='1';
325
+ update_option('famne_options',$this->options);
326
+ }
327
+
328
+
329
 
330
  /** update 1.0 to 1.1 fix:
331
  * update general wp_new_user_notification option into splitted options
includes/pluggable-functions-1.3.php CHANGED
@@ -149,6 +149,23 @@ endif;
149
 
150
 
151
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
 
153
 
154
  function fa_new_user_notification_to_admin ($user_id,$notify='')
149
 
150
 
151
 
152
+ if (empty($famne_options['auto_core_update_send_email']) && !function_exists('fa_dont_sent_auto_core_update_emails') ) :
153
+ /**
154
+ * Send email when wordpress automatic updated.
155
+ *
156
+ */
157
+ //echo "auto_core_update_send_email off";exit;
158
+
159
+
160
+ function fa_dont_sent_auto_core_update_emails( $send, $type, $core_update, $result ) {
161
+ if ( ! empty( $type ) && $type == 'success' ) {
162
+ return false;
163
+ }
164
+ return true;
165
+ }
166
+ add_filter( 'auto_core_update_send_email', 'fa_dont_sent_auto_core_update_emails', 10, 4 );
167
+ endif;
168
+
169
 
170
 
171
  function fa_new_user_notification_to_admin ($user_id,$notify='')
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.4.0
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.4.0
7
  Author: Virgial Berveling
8
  Author URI: https://www.freeamigos.nl
9
  Text Domain: manage-notification-emails
@@ -59,7 +59,7 @@ License: GPLv2
59
 
60
  if (!defined('ABSPATH')) die();
61
 
62
- define( 'FA_MNE_VERSION', '1.4.0' );
63
  define( 'FA_MNE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
64
  define( 'FA_MNE_PLUGIN_DIR', untrailingslashit( dirname( __FILE__ ) ) );
65
 
1
  <?php
2
  /*
3
  Plugin Name: Manage Notification E-mails
4
+ Plugin URI: https://www.freeamigos.nl/wp-plugins/manage-notification-emails/1.4.1
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.4.1
7
  Author: Virgial Berveling
8
  Author URI: https://www.freeamigos.nl
9
  Text Domain: manage-notification-emails
59
 
60
  if (!defined('ABSPATH')) die();
61
 
62
+ define( 'FA_MNE_VERSION', '1.4.1' );
63
  define( 'FA_MNE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
64
  define( 'FA_MNE_PLUGIN_DIR', untrailingslashit( dirname( __FILE__ ) ) );
65
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: (Virgial)
3
  Tags: notification,notify,email,user,password,moderator,postauthor,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: 4.9.8
7
- Stable tag: 1.4.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -61,6 +61,10 @@ If you're one of the early installers, than you'll be happy to see that de new u
61
 
62
  == Changelog ==
63
 
 
 
 
 
64
  = 1.4.0 =
65
  ADDED: Multi-language support
66
 
3
  Tags: notification,notify,email,user,password,moderator,postauthor,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: 5.0.3
7
+ Stable tag: 1.4.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
61
 
62
  == Changelog ==
63
 
64
+ = 1.4.1 =
65
+ ADDED: Manage sending e-mail after a successful automatic Wordpress core update to administrators. E-mails about failed updates will always be sent to the administrators and will not be disabled.
66
+
67
+
68
  = 1.4.0 =
69
  ADDED: Multi-language support
70