Manage Notification E-mails - Version 1.8.0

Version Description

ADDED: Multi-site support. ADDED: Import and export of settings. UPDATED: A lot of files are refactored and added some more comments along with it.

Download this release

Release Info

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

Code changes from version 1.6.1 to 1.8.0

Files changed (40) hide show
  1. core/class.FAMNE.php +286 -0
  2. core/functions.setup.php +34 -0
  3. includes/class.FAMNE.php +0 -117
  4. includes/class.FAMNESettingsPage.php +0 -322
  5. includes/pluggable-functions-1.4.php +0 -329
  6. includes/pluggable-functions.php +0 -213
  7. index.php +1 -1
  8. languages/manage-notification-emails-en.mo +0 -0
  9. languages/manage-notification-emails-en.po +486 -0
  10. languages/manage-notification-emails-nl_NL.mo +0 -0
  11. languages/manage-notification-emails-nl_NL.po +419 -73
  12. languages/manage-notification-emails.pot +370 -50
  13. manage-notification-emails.php +56 -60
  14. modules/custom-recipients.php +113 -0
  15. modules/export-settings.php +157 -0
  16. {includes → modules/pluggable}/pluggable-functions-1.2.php +0 -0
  17. {includes → modules/pluggable}/pluggable-functions-1.3.php +1 -1
  18. {includes → modules/pluggable}/pluggable-functions-1.5.php +7 -1
  19. modules/pluggable/pluggable.php +27 -0
  20. modules/settings-page/assets/main.min.css +3 -0
  21. modules/settings-page/assets/main.min.css.map +1 -0
  22. modules/settings-page/assets/main.min.js +2 -0
  23. modules/settings-page/assets/main.min.js.map +1 -0
  24. modules/settings-page/class.FAMNESettingsPage.php +383 -0
  25. modules/settings-page/formfields.php +87 -0
  26. modules/settings-page/settings-page.php +41 -0
  27. modules/settings-page/views/container-network.php +44 -0
  28. modules/settings-page/views/container.php +62 -0
  29. modules/settings-page/views/donatebox.php +26 -0
  30. modules/settings-page/views/extra.php +36 -0
  31. modules/settings-page/views/modules.php +45 -0
  32. modules/settings-page/views/network.php +36 -0
  33. modules/settings-page/views/settings.php +61 -0
  34. modules/settings-page/views/sidebar.php +0 -0
  35. modules/user-email-changed.php +140 -0
  36. readme.txt +16 -7
  37. screen-1.png +0 -0
  38. screenshot-1.png +0 -0
  39. screenshot-2.png +0 -0
  40. screenshot-3.png +0 -0
core/class.FAMNE.php ADDED
@@ -0,0 +1,286 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Manage notification emails settings page class
4
+ *
5
+ * Initializes the plugin.
6
+ *
7
+ * This file is part of the Manage Notification Emails plugin
8
+ * You can find out more about this plugin at https://www.freeamigos.nl
9
+ * Copyright (c) 2006-2015 Virgial Berveling
10
+ *
11
+ * @package WordPress
12
+ * @author Virgial Berveling
13
+ * @copyright 2006-2015
14
+ *
15
+ * since: 1.6.0
16
+ */
17
+
18
+ if ( ! class_exists( 'FAMNE' ) ) :
19
+ /**
20
+ * FAMNE
21
+ */
22
+ class FAMNE {
23
+
24
+ private static $modules = array();
25
+ private static $notices = array();
26
+ private static $network_managed = false;
27
+
28
+ /**
29
+ * __construct
30
+ *
31
+ * @return void
32
+ */
33
+ public function __construct() {
34
+ add_action( 'init', array( $this, 'do_modules' ) );
35
+ add_action( 'admin_footer', array( $this, 'admin_notices' ) );
36
+ self::$network_managed = self::get_option( 'famne_network_managed' ) ? true : false;
37
+ }
38
+
39
+ public static function network_managed()
40
+ {
41
+ return self::$network_managed;
42
+ }
43
+
44
+ /**
45
+ * AddModule
46
+ *
47
+ * @param mixed $name
48
+ * @param mixed $args
49
+ * @return void
50
+ */
51
+ public static function AddModule( $name, $args ) {
52
+ self::$modules[ $name ] = (object) array(
53
+ 'name' => isset( $args['name'] ) ? $args['name'] : $name,
54
+ 'version' => isset( $args['version'] ) ? $args['version'] : FA_MNE_VERSION,
55
+ 'licensed' => isset( $args['licensed'] ) ? true : false,
56
+ 'slug' => isset( $args['slug'] ) ? $args['slug'] : $name,
57
+ 'card' => isset( $args['card'] ) ? $args['card'] : null,
58
+ 'option_id' => isset( $args['option_id'] ) ? $args['option_id'] : null,
59
+ );
60
+ }
61
+
62
+ /**
63
+ * Get modules
64
+ *
65
+ * @return array
66
+ */
67
+ public static function getModules() {
68
+ return self::$modules;
69
+ }
70
+
71
+ /**
72
+ * Add Notice
73
+ *
74
+ * @param string $message
75
+ * @param string $priority
76
+ * @param boolean $dismissible
77
+ * @return void
78
+ */
79
+ public static function AddNotice( $message = 'missing notification message', $priority = 'error', $dismissible = false ) {
80
+ self::$notices[] = array(
81
+ 'message' => $message,
82
+ 'priority' => $priority,
83
+ 'dismissible' => $dismissible,
84
+ );
85
+ }
86
+
87
+ /**
88
+ * Admin notices
89
+ *
90
+ * @return void
91
+ */
92
+ public function admin_notices() {
93
+ $count = count( self::$notices );
94
+ while ( is_array( self::$notices ) && $count > 0 ) :
95
+ $notice = array_pop( self::$notices );
96
+ $dismissible = $notice['dismissible'] ? ' is-dismissible' : '';
97
+ printf( '<div class="%1$s"><p>%2$s</p></div>', 'notice notice-' . $notice['priority'] . $dismissible, $notice['message'] );
98
+ endwhile;
99
+ }
100
+
101
+
102
+
103
+ /**
104
+ * Added folder namespacing
105
+ *
106
+ * @since 2.0.1
107
+ */
108
+ public function do_modules() {
109
+ do_action( 'fa_mne_modules' );
110
+ }
111
+
112
+
113
+
114
+ /**
115
+ * Get_option
116
+ *
117
+ * @param mixed $name
118
+ * @return mixed $option
119
+ */
120
+ public static function get_option( $name ) {
121
+ if ( 'fa_mne_version' === $name ) {
122
+ return get_site_option( $name );
123
+ }
124
+ if ( 'famne_network_managed' === $name ) {
125
+ return get_site_option( $name );
126
+ }
127
+
128
+ return self::$network_managed ? get_site_option( $name ) : get_option( $name );
129
+ }
130
+
131
+ /**
132
+ * Update_option
133
+ *
134
+ * @param string $name
135
+ * @param mixed $options
136
+ * @return boolean
137
+ */
138
+ public static function update_option( $name, $options ) {
139
+
140
+ if ( 'fa_mne_version' === $name ) {
141
+ return update_site_option( $name, $options );
142
+ }
143
+ if ( 'famne_network_managed' === $name ) {
144
+ self::$network_managed = '1' === $options ? true : false;
145
+ return update_site_option( $name, $options );
146
+ }
147
+ return self::$network_managed ? update_site_option( $name, $options ) : update_option( $name, $options );
148
+ }
149
+
150
+ /**
151
+ * Default_options
152
+ *
153
+ * @return array
154
+ */
155
+ public static function default_options() {
156
+ return array(
157
+ 'wp_new_user_notification_to_user' => '1',
158
+ 'wp_new_user_notification_to_admin' => '1',
159
+ 'wp_notify_postauthor' => '1',
160
+ 'wp_notify_moderator' => '1',
161
+ 'wp_password_change_notification' => '1',
162
+ 'send_password_change_email' => '1',
163
+ 'send_email_change_email' => '1',
164
+ 'send_password_forgotten_email' => '1',
165
+ 'send_password_admin_forgotten_email' => '1',
166
+ 'auto_core_update_send_email' => '1',
167
+ 'auto_plugin_update_send_email' => '1',
168
+ 'auto_theme_update_send_email' => '1',
169
+ );
170
+ }
171
+
172
+ /**
173
+ * Update_check
174
+ *
175
+ * @return void
176
+ */
177
+ public static function update_check() {
178
+ if ( self::get_option( 'fa_mne_version' ) !== FA_MNE_VERSION ) {
179
+ $options = self::get_option( 'famne_options' );
180
+ $current_version = self::get_option( 'fa_mne_version' );
181
+
182
+ /* Is this the first install, then set all defaults to active */
183
+ if ( false === $options ) {
184
+ self::install();
185
+ return;
186
+ }
187
+
188
+ if ( version_compare( $current_version, '1.5.1' ) <= 0 ) {
189
+ /** Update to 1.6.0
190
+ * setting the newly added options to checked as default
191
+ */
192
+ $options['auto_plugin_update_send_email'] = '1';
193
+ $options['auto_theme_update_send_email'] = '1';
194
+ self::update_option( 'famne_options', $options );
195
+ }
196
+
197
+ if ( '1.1.0' === $current_version ) {
198
+ /** Update 1.1.0 to 1.2.0
199
+ * setting the newly added options to checked as default
200
+ */
201
+
202
+ $options['send_password_forgotten_email'] = '1';
203
+ $options['send_password_admin_forgotten_email'] = '1';
204
+
205
+ self::update_option( 'famne_options', $options );
206
+ }
207
+
208
+ /**
209
+ * Update to 1.4.1
210
+ * setting the newly added options to checked as default
211
+ */
212
+
213
+ if ( version_compare( $current_version, '1.4.0' ) <= 0 ) {
214
+ $options['auto_core_update_send_email'] = '1';
215
+ self::update_option( 'famne_options', $options );
216
+ }
217
+
218
+ /** Update 1.0 to 1.1 fix:
219
+ * update general wp_new_user_notification option into splitted options
220
+ */
221
+ if ( version_compare( $current_version, '1.0.0' ) <= 0 ) {
222
+ unset( $options['wp_new_user_notification'] );
223
+ $options['wp_new_user_notification_to_user'] = '1';
224
+ $options['wp_new_user_notification_to_admin'] = '1';
225
+ self::update_option( 'famne_options', $options );
226
+ }
227
+
228
+ /* UPDATE DONE! */
229
+ self::update_option( 'fa_mne_version', FA_MNE_VERSION );
230
+ }
231
+ }
232
+
233
+
234
+
235
+ /**
236
+ * Get the IDs of all sites on the network.
237
+ *
238
+ * @since 1.8.0
239
+ *
240
+ * @return array The IDs of all sites on the network.
241
+ */
242
+ protected static function get_all_site_ids() {
243
+
244
+ global $wpdb;
245
+ $site_ids = $wpdb->get_col(
246
+ "
247
+ SELECT `blog_id`
248
+ FROM `{$wpdb->blogs}`
249
+ WHERE `site_id` = {$wpdb->siteid}
250
+ "
251
+ );
252
+ return $site_ids;
253
+ }
254
+
255
+
256
+ /**
257
+ * Install
258
+ *
259
+ * @return void
260
+ */
261
+ public static function install() {
262
+ $famne_options = self::default_options();
263
+ self::update_option( 'famne_options', $famne_options );
264
+ self::update_option( 'fa_mne_version', FA_MNE_VERSION );
265
+ }
266
+
267
+ /**
268
+ * Uninstall
269
+ *
270
+ * @return void
271
+ */
272
+ public static function uninstall() {
273
+ delete_site_option( 'fa_mne_version' );
274
+ delete_site_option( 'famne_options' );
275
+ delete_site_option( 'famne_network_managed' );
276
+ delete_option( 'fa_mne_version' );
277
+ delete_option( 'famne_options' );
278
+
279
+ if ( is_multisite() ) {
280
+ foreach ( self::get_all_site_ids() as $id ) {
281
+ delete_blog_option( $id, 'famne_options' );
282
+ }
283
+ }
284
+ }
285
+ }
286
+ endif;
core/functions.setup.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Manage notification emails add donation link
4
+ *
5
+ * This file is part of the Manage Notification Emails plugin
6
+ * You can find out more about this plugin at https://www.freeamigos.nl
7
+ * Copyright (c) 2006-2015 Virgial Berveling
8
+ *
9
+ * @package WordPress
10
+ * @author Virgial Berveling
11
+ * @copyright 2006-2015
12
+ *
13
+ * since: 1.6.0
14
+ */
15
+
16
+ if ( class_exists( 'FAMNE' ) && ! function_exists( 'famne_meta_links' ) ) :
17
+
18
+ /**
19
+ * Famne_meta_links
20
+ *
21
+ * @param array $links
22
+ * @param string $file
23
+ * @return array
24
+ */
25
+ function famne_meta_links( $links, $file ) {
26
+ if ( 'manage-notification-emails/manage-notification-emails.php' === $file ) {
27
+ $links[] = '<a href="https://paypal.me/virgial/5" target="_blank" title="' . __( 'Donate', 'manage-notification-emails' ) . '"><strong>' . __( 'Donate', 'manage-notification-emails' ) . '</strong> <span class="dashicons dashicons-coffee"></span></a>';
28
+ }
29
+ return $links;
30
+ }
31
+
32
+ add_filter( 'plugin_row_meta', 'famne_meta_links', 10, 2 );
33
+
34
+ endif;
includes/class.FAMNE.php DELETED
@@ -1,117 +0,0 @@
1
- <?php
2
- /**
3
- * Manage notification emails settings page class
4
- *
5
- * initializes the plugin.
6
- *
7
- * This file is part of the Manage Notification Emails plugin
8
- * You can find out more about this plugin at http://www.freeamigos.mx
9
- * Copyright (c) 2006-2015 Virgial Berveling
10
- *
11
- * @package WordPress
12
- * @author Virgial Berveling
13
- * @copyright 2006-2015
14
- *
15
- * since: 1.6.0
16
- */
17
-
18
- if (!class_exists('FAMNE')):
19
- class FAMNE{
20
-
21
- static public function get_option($name)
22
- {
23
- if ($name == 'fa_mne_version') return get_site_option($name);
24
-
25
- return get_option($name);
26
- }
27
-
28
- static public function update_option($name,$options)
29
- {
30
- if ($name == 'fa_mne_version') return update_site_option($name,$options);
31
-
32
- return update_option($name,$options);
33
-
34
- }
35
- static public function update_check()
36
- {
37
- if (self::get_option( 'fa_mne_version' ) != FA_MNE_VERSION) {
38
- $options = self::get_option( 'famne_options' );
39
- $current_version = self::get_option( 'fa_mne_version' );
40
-
41
- /* Is this the first install, then set all defaults to active */
42
- if ($options === false)
43
- {
44
- $options = array(
45
- 'wp_new_user_notification_to_user' => '1',
46
- 'wp_new_user_notification_to_admin' => '1',
47
- 'wp_notify_postauthor' => '1',
48
- 'wp_notify_moderator' => '1',
49
- 'wp_password_change_notification' => '1',
50
- 'send_password_change_email' => '1',
51
- 'send_email_change_email' => '1',
52
- 'send_password_forgotten_email' => '1',
53
- 'send_password_admin_forgotten_email' => '1',
54
- 'auto_core_update_send_email' => '1',
55
- 'auto_plugin_update_send_email' => '1',
56
- 'auto_theme_update_send_email' => '1'
57
- );
58
-
59
- self::update_option('famne_options',$options);
60
-
61
- /* UPDATE DONE! */
62
- self::update_option('fa_mne_version',FA_MNE_VERSION);
63
- return;
64
- }
65
-
66
- if ( version_compare($current_version, '1.5.1') <=0)
67
- {
68
- /** update to 1.6.0
69
- * setting the newly added options to checked as default
70
- */
71
- $options['auto_plugin_update_send_email'] = '1';
72
- $options['auto_theme_update_send_email'] = '1';
73
- self::update_option('famne_options',$options);
74
- }
75
-
76
- if ($current_version == '1.1.0')
77
- {
78
- /** update 1.1.0 to 1.2.0
79
- * setting the newly added options to checked as default
80
- */
81
-
82
- $options['send_password_forgotten_email'] = '1';
83
- $options['send_password_admin_forgotten_email'] ='1';
84
-
85
- self::update_option('famne_options',$options);
86
- }
87
-
88
-
89
- /** update to 1.4.1
90
- * setting the newly added options to checked as default
91
- */
92
-
93
- if ( version_compare($current_version, '1.4.0') <=0)
94
- {
95
- $options['auto_core_update_send_email'] ='1';
96
- self::update_option('famne_options',$options);
97
- }
98
-
99
-
100
-
101
- /** update 1.0 to 1.1 fix:
102
- * update general wp_new_user_notification option into splitted options
103
- */
104
- if ( version_compare($current_version, '1.0.0') <=0)
105
- {
106
- unset($options['wp_new_user_notification']);
107
- $options['wp_new_user_notification_to_user'] ='1';
108
- $options['wp_new_user_notification_to_admin'] ='1';
109
- self::update_option('famne_options',$options);
110
- }
111
-
112
- /* UPDATE DONE! */
113
- self::update_option('fa_mne_version',FA_MNE_VERSION);
114
- }
115
- }
116
- }
117
- endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/class.FAMNESettingsPage.php DELETED
@@ -1,322 +0,0 @@
1
- <?php
2
- /**
3
- * Manage notification emails settings page class
4
- *
5
- * Displays the settings page.
6
- *
7
- * This file is part of the Manage Notification Emails plugin
8
- * You can find out more about this plugin at http://www.freeamigos.mx
9
- * Copyright (c) 2006-2015 Virgial Berveling
10
- *
11
- * @package WordPress
12
- * @author Virgial Berveling
13
- * @copyright 2006-2015
14
- *
15
- * version: 1.3.0
16
- */
17
-
18
- if (!class_exists('FAMNESettingsPage')):
19
-
20
- class FAMNESettingsPage
21
- {
22
- /**
23
- * Holds the values to be used in the fields callbacks
24
- */
25
- private $options;
26
-
27
- /**
28
- * Start up
29
- */
30
- public function __construct()
31
- {
32
- add_action( 'admin_menu', array( $this, 'add_plugin_page' ) );
33
- add_action( 'admin_init', array( $this, 'page_init' ) );
34
- add_filter( 'plugin_action_links_' . FA_MNE_PLUGIN_BASENAME, array($this,'add_action_links') );
35
- add_action( 'init', array( $this, 'famne_load_textdomain') );
36
- }
37
-
38
- /**
39
- * Add options page
40
- */
41
- public function add_plugin_page()
42
- {
43
- // This page will be under "Settings"
44
- add_options_page(
45
- 'Settings Admin',
46
- 'Notification e-mails',
47
- 'manage_options',
48
- 'famne-admin',
49
- array( $this, 'create_admin_page' )
50
- );
51
- }
52
-
53
- /**
54
- * Options page callback
55
- */
56
- public function create_admin_page()
57
- {
58
- // Set class property
59
- $this->options = FAMNE::get_option( 'famne_options' );
60
-
61
- ?>
62
- <div class="wrap">
63
- <h2><?php _e('Manage the notification e-mails','manage-notification-emails')?></h2>
64
- <form method="post" action="options.php">
65
- <?php
66
- // This prints out all hidden setting fields
67
- settings_fields( 'famne_option_group' );
68
- do_settings_sections( 'famne-admin' );
69
- submit_button();
70
- ?>
71
- </form>
72
-
73
- <div style="padding:40px;text-align:center;color:rgba(0,0,0,0.7);">
74
- <p class="description"><?php _e('If you find this plugin useful, you can show your appreciation here :-)','manage-notification-emails')?></p>
75
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
76
- <input type="hidden" name="cmd" value="_s-xclick">
77
- <input type="hidden" name="hosted_button_id" value="LTZWTLEDPULFE">
78
- <input type="image" src="https://www.paypalobjects.com/nl_NL/NL/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal, de veilige en complete manier van online betalen.">
79
- <img alt="" border="0" src="https://www.paypalobjects.com/nl_NL/i/scr/pixel.gif" width="1" height="1">
80
- </form>
81
- </div>
82
-
83
- </div>
84
- <?php
85
- }
86
-
87
- /**
88
- * Register and add settings
89
- */
90
- public function page_init()
91
- {
92
- register_setting(
93
- 'famne_option_group', // Option group
94
- 'famne_options', // Option name
95
- array( $this, 'sanitize' ) // Sanitize
96
- );
97
-
98
- add_settings_section(
99
- 'setting_section_id', // ID
100
- '', // Title
101
- array( $this, 'print_section_info' ), // Callback
102
- 'famne-admin' // Page
103
- );
104
-
105
- add_settings_field(
106
- 'wp_new_user_notification_to_admin', // ID
107
- __('New user notification to admin','manage-notification-emails'), // Title
108
- array( $this, 'field1_callback' ), // Callback
109
- 'famne-admin', // Page
110
- 'setting_section_id' // Section
111
- );
112
-
113
- add_settings_field(
114
- 'wp_new_user_notification_to_user', // ID
115
- __('New user notification to user','manage-notification-emails'), // Title
116
- array( $this, 'field7_callback' ), // Callback
117
- 'famne-admin', // Page
118
- 'setting_section_id' // Section
119
- );
120
-
121
- add_settings_field(
122
- 'wp_notify_postauthor',
123
- __('Notify post author','manage-notification-emails'),
124
- array( $this, 'field2_callback' ),
125
- 'famne-admin',
126
- 'setting_section_id'
127
- );
128
-
129
- add_settings_field(
130
- 'wp_notify_moderator',
131
- __('Notify moderator','manage-notification-emails'),
132
- array( $this, 'field3_callback' ),
133
- 'famne-admin',
134
- 'setting_section_id'
135
- );
136
-
137
- add_settings_field(
138
- 'wp_password_change_notification',
139
- __('Password change notification to admin','manage-notification-emails'),
140
- array( $this, 'field4_callback' ),
141
- 'famne-admin',
142
- 'setting_section_id'
143
- );
144
-
145
- add_settings_field(
146
- 'send_password_change_email',
147
- __('Password change notification to user','manage-notification-emails'),
148
- array( $this, 'field5_callback' ),
149
- 'famne-admin',
150
- 'setting_section_id'
151
- );
152
-
153
- add_settings_field(
154
- 'send_email_change_email',
155
- __('E-mail address change notification to user','manage-notification-emails'),
156
- array( $this, 'field6_callback' ),
157
- 'famne-admin',
158
- 'setting_section_id'
159
- );
160
-
161
- add_settings_field(
162
- 'send_password_forgotten_email',
163
- __('Password forgotten e-mail to user','manage-notification-emails'),
164
- array( $this, 'field8_callback' ),
165
- 'famne-admin',
166
- 'setting_section_id'
167
- );
168
-
169
- add_settings_field(
170
- 'auto_core_update_send_email',
171
- __('automatic Wordpress core update e-mail','manage-notification-emails'),
172
- array( $this, 'field10_callback' ),
173
- 'famne-admin',
174
- 'setting_section_id'
175
- );
176
-
177
- add_settings_field(
178
- 'auto_plugin_update_send_email',
179
- __('Automatic Wordpress plugin update e-mail','manage-notification-emails'),
180
- array( $this, 'field11_callback' ),
181
- 'famne-admin',
182
- 'setting_section_id'
183
- );
184
-
185
- add_settings_field(
186
- 'auto_theme_update_send_email',
187
- __('Automatic Wordpress theme update e-mail','manage-notification-emails'),
188
- array( $this, 'field12_callback' ),
189
- 'famne-admin',
190
- 'setting_section_id'
191
- );
192
-
193
- add_settings_field(
194
- 'send_password_admin_forgotten_email',
195
- __('Password forgotten e-mail to administrator','manage-notification-emails'),
196
- array( $this, 'field9_callback' ),
197
- 'famne-admin',
198
- 'setting_section_id'
199
- );
200
-
201
-
202
-
203
-
204
- }
205
-
206
- /**
207
- * Sanitize each setting field as needed
208
- *
209
- * @param array $input Contains all settings fields as array keys
210
- */
211
- public function sanitize( $input )
212
- {
213
- if (empty($input)) $input = array();
214
- $new_input = array();
215
- foreach( $input as $key=>$val )
216
- $new_input[$key] = $val == '1'?'1':'';
217
-
218
- return $new_input;
219
- }
220
-
221
- /**
222
- * Print the Section text
223
- */
224
- public function print_section_info()
225
- {
226
- _e('Manage your notification e-mail preferences below.','manage-notification-emails');
227
- echo '<br/>';
228
- _e('By unchecking the checkbox you prevent sending the specific e-mails.','manage-notification-emails');
229
- }
230
-
231
- /**
232
- * Get the settings option array and print one of its values
233
- */
234
-
235
- public function print_checkbox($name,$id,$message='')
236
- {
237
- $checked = isset( $this->options[$id]) && $this->options[$id] =='1' ?true:false;
238
-
239
- if ($checked) {$add_check = 'checked="checked"';}else {$add_check='';};
240
- print '<label><input type="checkbox" name="famne_options['.$id.']" value="1" '.$add_check.' />&nbsp;'.__('Enable sending e-mail','manage-notification-emails').'</label>';
241
- print '<p class="description">'.$message.'</p>';
242
- }
243
-
244
-
245
- public function field1_callback()
246
- {
247
- $this->print_checkbox('field1','wp_new_user_notification_to_admin',__('Sends an e-mail to the site admin after a new user is registered.','manage-notification-emails'));
248
- }
249
-
250
- public function field7_callback()
251
- {
252
- $this->print_checkbox('field7','wp_new_user_notification_to_user',__('Send e-mail with login credentials to a newly-registered user.','manage-notification-emails'));
253
- }
254
-
255
- public function field2_callback()
256
- {
257
- $this->print_checkbox('field2','wp_notify_postauthor',__('Send e-mail to an author (and/or others) of a comment/trackback/pingback on a post.','manage-notification-emails'));
258
- }
259
-
260
- public function field3_callback()
261
- {
262
- $this->print_checkbox('field3','wp_notify_moderator',__('Send e-mail to the moderator of the blog about a new comment that is awaiting approval.','manage-notification-emails'));
263
- }
264
-
265
- public function field4_callback()
266
- {
267
- $this->print_checkbox('field4','wp_password_change_notification',__('Send e-mail to the blog admin of a user changing his or her password.','manage-notification-emails'));
268
- }
269
-
270
- public function field5_callback()
271
- {
272
- $this->print_checkbox('field5','send_password_change_email',__('Send e-mail to registered user about changing his or her password. Be careful with this option, because when unchecked, the forgotten password request e-mails will be blocked too.','manage-notification-emails'));
273
- }
274
-
275
- public function field6_callback()
276
- {
277
- $this->print_checkbox('field6','send_email_change_email',__('Send e-mail to registered user about changing his or her E-mail address.','manage-notification-emails'));
278
- }
279
-
280
- public function field8_callback()
281
- {
282
- $this->print_checkbox('field8','send_password_forgotten_email',__('Send the forgotten password e-mail to registered user.<br/>(To prevent locking yourself out, sending of the forgotten password e-mail for administrators will still work)','manage-notification-emails'));
283
- }
284
- public function field9_callback()
285
- {
286
- $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'));
287
- }
288
-
289
- public function field10_callback()
290
- {
291
- $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'));
292
- }
293
-
294
- public function field11_callback()
295
- {
296
- $this->print_checkbox('field11','auto_plugin_update_send_email',__('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'));
297
- }
298
-
299
- public function field12_callback()
300
- {
301
- $this->print_checkbox('field12','auto_theme_update_send_email',__('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'));
302
- }
303
-
304
-
305
- function add_action_links ( $links ) {
306
- $mylinks = array(
307
- '<a href="' . admin_url( 'options-general.php?page=famne-admin' ) . '">'.__('Settings').'</a>',
308
- );
309
- return array_merge( $links, $mylinks );
310
- }
311
-
312
- /**
313
- * Translations.
314
- *
315
- * @since 1.4.2
316
- */
317
- function famne_load_textdomain() {
318
- load_plugin_textdomain( 'manage-notification-emails', false, basename(FA_MNE_PLUGIN_DIR) . '/languages' );
319
- }
320
- }
321
-
322
- endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/pluggable-functions-1.4.php DELETED
@@ -1,329 +0,0 @@
1
- <?php
2
- /**
3
-
4
- STOP SENDING NOTIFICATION MAILS TO THE USERS
5
- version: 1.5.1
6
- updated: the core pluggable function wp_new_user_notification
7
- added: passing through the $deprecated and $notify
8
- fixed notice of $deprecated
9
- */
10
-
11
- if (!defined('ABSPATH')) die();
12
-
13
- $famne_options = get_option( 'famne_options' );
14
-
15
- if (!function_exists('dont_send_password_change_email') ) :
16
- /**
17
- * Email password change notification to registered user.
18
- *
19
- */
20
- //echo "dont_send_password_change_email";
21
- function dont_send_password_change_email( $send=false, $user='', $userdata='')
22
- {
23
-
24
- global $famne_options;
25
-
26
- if (is_array($user)) $user = (object) $user;
27
-
28
- if (!empty($famne_options['wp_password_change_notification']) ) :
29
-
30
- // send a copy of password change notification to the admin
31
- // but check to see if it's the admin whose password we're changing, and skip this
32
- if ( 0 !== strcasecmp( $user->user_email, get_option( 'admin_email' ) ) ) {
33
- $message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n";
34
- // The blogname option is escaped with esc_html on the way into the database in sanitize_option
35
- // we want to reverse this for the plain text arena of emails.
36
- $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
37
- wp_mail(get_option('admin_email'), sprintf(__('[%s] Password Lost/Changed'), $blogname), $message);
38
- }
39
-
40
- endif;
41
-
42
- if (empty($famne_options['send_password_change_email']) ) :
43
- return false;
44
- else :
45
- return true;
46
- endif;
47
- }
48
- add_filter('send_password_change_email', 'dont_send_password_change_email',1,3);
49
- endif;
50
-
51
-
52
- if (empty($famne_options['send_email_change_email']) && !function_exists('dont_send_email_change_email') ) :
53
- /**
54
- * Email users e-mail change notification to registered user.
55
- *
56
- */
57
- //echo "dont_send_email_change_email off";
58
- function dont_send_email_change_email( $send=false, $user='', $userdata='')
59
- {
60
- return false;
61
- }
62
- add_filter('send_email_change_email', 'dont_send_email_change_email',1,3);
63
- endif;
64
-
65
-
66
-
67
- if (!function_exists('wp_new_user_notification') ) :
68
- /**
69
- * Email login credentials to a newly-registered user.
70
- *
71
- * A new user registration notification is also sent to admin email.
72
- */
73
- //echo "wp_new_user_notification off";
74
- function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' ) {
75
-
76
- global $famne_options;
77
-
78
- if (!empty($famne_options['wp_new_user_notification_to_admin']))
79
- {
80
- fa_new_user_notification_to_admin($user_id,$deprecated,$notify);
81
- }
82
-
83
- if (!empty($famne_options['wp_new_user_notification_to_user']))
84
- {
85
- fa_new_user_notification_to_user($user_id,$deprecated,$notify);
86
- }
87
- }
88
- endif;
89
-
90
- if (empty($famne_options['wp_notify_postauthor']) && !function_exists('wp_notify_postauthor') ) :
91
- /**
92
- * Notify an author (and/or others) of a comment/trackback/pingback on a post.
93
- */
94
- //echo "wp_notify_postauthor off";
95
- function wp_notify_postauthor( $comment_id, $deprecated = null ) {}
96
- endif;
97
-
98
- if (empty($famne_options['wp_notify_moderator']) && !function_exists('wp_notify_moderator') ) :
99
- /**
100
- * Notifies the moderator of the blog about a new comment that is awaiting approval.
101
- */
102
- //echo "wp_notify_moderator off";
103
- function wp_notify_moderator($comment_id) {}
104
- endif;
105
-
106
-
107
-
108
-
109
- if (empty($famne_options['wp_password_change_notification']) && !function_exists('wp_password_change_notification') ) :
110
- /**
111
- * Notify the blog admin of a user changing password, normally via email.
112
- */
113
- function wp_password_change_notification($user) {}
114
-
115
-
116
- endif;
117
-
118
-
119
-
120
- if ((empty($famne_options['send_password_forgotten_email']) || empty($famne_options['send_password_admin_forgotten_email'])) && !function_exists('dont_send_password_forgotten_email') ) :
121
- /**
122
- * Email forgotten password notification to registered user.
123
- *
124
- */
125
- //echo "dont_send_password_forgotten_email off";exit;
126
- function dont_send_password_forgotten_email( $send=true, $user_id=0 )
127
- {
128
- global $famne_options;
129
-
130
- $is_administrator = fa_user_is_administrator($user_id);
131
-
132
- if ($is_administrator && empty($famne_options['send_password_admin_forgotten_email']))
133
- {
134
- // stop sending admin forgot email
135
- return false;
136
- }
137
- if (!$is_administrator && empty($famne_options['send_password_forgotten_email']))
138
- {
139
- // stop sending user forgot email
140
- return false;
141
- }
142
- // none of the above so give the default status back
143
- return $send;
144
- }
145
- add_filter('allow_password_reset', 'dont_send_password_forgotten_email',1,3);
146
- endif;
147
-
148
-
149
-
150
-
151
- if (empty($famne_options['auto_core_update_send_email']) && !function_exists('fa_dont_sent_auto_core_update_emails') ) :
152
- /**
153
- * Send email when wordpress automatic updated.
154
- *
155
- */
156
- //echo "auto_core_update_send_email off";exit;
157
-
158
-
159
- function fa_dont_sent_auto_core_update_emails( $send, $type, $core_update, $result ) {
160
- if ( ! empty( $type ) && $type == 'success' ) {
161
- return false;
162
- }
163
- return true;
164
- }
165
- add_filter( 'auto_core_update_send_email', 'fa_dont_sent_auto_core_update_emails', 10, 4 );
166
- endif;
167
-
168
-
169
-
170
- function fa_new_user_notification_to_admin ($user_id,$deprecated,$notify='')
171
- {
172
-
173
- //Most parts of this function are copied form pluggable.php
174
-
175
- if ( $deprecated !== null ) {
176
- _deprecated_argument( __FUNCTION__, '4.3.1' );
177
- }
178
-
179
- global $wpdb, $wp_hasher;
180
- $user = get_userdata( $user_id );
181
-
182
- // The blogname option is escaped with esc_html on the way into the database in sanitize_option
183
- // we want to reverse this for the plain text arena of emails.
184
- $blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
185
-
186
- if ( 'user' !== $notify ) {
187
- $switched_locale = switch_to_locale( get_locale() );
188
-
189
- /* translators: %s: site title */
190
- $message = sprintf( __( 'New user registration on your site %s:' ), $blogname ) . "\r\n\r\n";
191
- /* translators: %s: user login */
192
- $message .= sprintf( __( 'Username: %s' ), $user->user_login ) . "\r\n\r\n";
193
- /* translators: %s: user email address */
194
- $message .= sprintf( __( 'Email: %s' ), $user->user_email ) . "\r\n";
195
-
196
- $wp_new_user_notification_email_admin = array(
197
- 'to' => get_option( 'admin_email' ),
198
- /* translators: New user registration notification email subject. %s: Site title */
199
- 'subject' => __( '[%s] New User Registration' ),
200
- 'message' => $message,
201
- 'headers' => '',
202
- );
203
-
204
- /**
205
- * Filters the contents of the new user notification email sent to the site admin.
206
- *
207
- * @since 4.9.0
208
- *
209
- * @param array $wp_new_user_notification_email {
210
- * Used to build wp_mail().
211
- *
212
- * @type string $to The intended recipient - site admin email address.
213
- * @type string $subject The subject of the email.
214
- * @type string $message The body of the email.
215
- * @type string $headers The headers of the email.
216
- * }
217
- * @param WP_User $user User object for new user.
218
- * @param string $blogname The site title.
219
- */
220
- $wp_new_user_notification_email_admin = apply_filters( 'wp_new_user_notification_email_admin', $wp_new_user_notification_email_admin, $user, $blogname );
221
-
222
- @wp_mail(
223
- $wp_new_user_notification_email_admin['to'],
224
- wp_specialchars_decode( sprintf( $wp_new_user_notification_email_admin['subject'], $blogname ) ),
225
- $wp_new_user_notification_email_admin['message'],
226
- $wp_new_user_notification_email_admin['headers']
227
- );
228
-
229
- if ( $switched_locale ) {
230
- restore_previous_locale();
231
- }
232
- }
233
- }
234
-
235
-
236
- function fa_new_user_notification_to_user($user_id,$deprecated=null,$notify='')
237
- {
238
- if ( $deprecated !== null ) {
239
- _deprecated_argument( __FUNCTION__, '4.3.1' );
240
- }
241
-
242
- // Accepts only 'user', 'admin' , 'both' or default '' as $notify
243
- if ( ! in_array( $notify, array( 'user', 'admin', 'both', '' ), true ) ) {
244
- return;
245
- }
246
-
247
- global $wpdb, $wp_hasher;
248
- $user = get_userdata( $user_id );
249
-
250
- // The blogname option is escaped with esc_html on the way into the database in sanitize_option
251
- // we want to reverse this for the plain text arena of emails.
252
- $blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
253
-
254
- // `$deprecated was pre-4.3 `$plaintext_pass`. An empty `$plaintext_pass` didn't sent a user notification.
255
- if ( 'admin' === $notify || ( empty( $deprecated ) && empty( $notify ) ) ) {
256
- return;
257
- }
258
-
259
- // Generate something random for a password reset key.
260
- $key = wp_generate_password( 20, false );
261
-
262
- /** This action is documented in wp-login.php */
263
- do_action( 'retrieve_password_key', $user->user_login, $key );
264
-
265
- // Now insert the key, hashed, into the DB.
266
- if ( empty( $wp_hasher ) ) {
267
- require_once ABSPATH . WPINC . '/class-phpass.php';
268
- $wp_hasher = new PasswordHash( 8, true );
269
- }
270
- $hashed = time() . ':' . $wp_hasher->HashPassword( $key );
271
- $wpdb->update( $wpdb->users, array( 'user_activation_key' => $hashed ), array( 'user_login' => $user->user_login ) );
272
-
273
- $switched_locale = switch_to_locale( get_user_locale( $user ) );
274
-
275
- /* translators: %s: user login */
276
- $message = sprintf( __( 'Username: %s' ), $user->user_login ) . "\r\n\r\n";
277
- $message .= __( 'To set your password, visit the following address:' ) . "\r\n\r\n";
278
- $message .= '<' . network_site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user->user_login ), 'login' ) . ">\r\n\r\n";
279
-
280
- $message .= wp_login_url() . "\r\n";
281
-
282
- $wp_new_user_notification_email = array(
283
- 'to' => $user->user_email,
284
- /* translators: Login details notification email subject. %s: Site title */
285
- 'subject' => __( '[%s] Login Details' ),
286
- 'message' => $message,
287
- 'headers' => '',
288
- );
289
-
290
- /**
291
- * Filters the contents of the new user notification email sent to the new user.
292
- *
293
- * @since 4.9.0
294
- *
295
- * @param array $wp_new_user_notification_email {
296
- * Used to build wp_mail().
297
- *
298
- * @type string $to The intended recipient - New user email address.
299
- * @type string $subject The subject of the email.
300
- * @type string $message The body of the email.
301
- * @type string $headers The headers of the email.
302
- * }
303
- * @param WP_User $user User object for new user.
304
- * @param string $blogname The site title.
305
- */
306
- $wp_new_user_notification_email = apply_filters( 'wp_new_user_notification_email', $wp_new_user_notification_email, $user, $blogname );
307
-
308
- wp_mail(
309
- $wp_new_user_notification_email['to'],
310
- wp_specialchars_decode( sprintf( $wp_new_user_notification_email['subject'], $blogname ) ),
311
- $wp_new_user_notification_email['message'],
312
- $wp_new_user_notification_email['headers']
313
- );
314
-
315
- if ( $switched_locale ) {
316
- restore_previous_locale();
317
- }
318
- }
319
-
320
- function fa_user_is_administrator($user_id=0)
321
- {
322
- $user = new WP_User( intval($user_id) );
323
- $is_administrator = false;
324
- if ( !empty( $user->roles ) && is_array( $user->roles ) ) {
325
- foreach ( $user->roles as $role )
326
- if ( strtolower($role) == 'administrator') $is_administrator = true;
327
- }
328
- return $is_administrator;
329
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/pluggable-functions.php DELETED
@@ -1,213 +0,0 @@
1
- <?php
2
- /**
3
-
4
- STOP SENDING NOTIFICATION MAILS TO THE USERS
5
- version: 1.2.0
6
- */
7
-
8
- if (!defined('ABSPATH')) die();
9
-
10
- $famne_options = get_option( 'famne_options' );
11
-
12
- if (!function_exists('dont_send_password_change_email') ) :
13
- /**
14
- * Email password change notification to registered user.
15
- *
16
- */
17
- //echo "dont_send_password_change_email";
18
- function dont_send_password_change_email( $send=false, $user='', $userdata='')
19
- {
20
-
21
- global $famne_options;
22
-
23
- if (is_array($user)) $user = (object) $user;
24
-
25
- if (!empty($famne_options['wp_password_change_notification']) ) :
26
-
27
- // send a copy of password change notification to the admin
28
- // but check to see if it's the admin whose password we're changing, and skip this
29
- if ( 0 !== strcasecmp( $user->user_email, get_option( 'admin_email' ) ) ) {
30
- $message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n";
31
- // The blogname option is escaped with esc_html on the way into the database in sanitize_option
32
- // we want to reverse this for the plain text arena of emails.
33
- $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
34
- wp_mail(get_option('admin_email'), sprintf(__('[%s] Password Lost/Changed'), $blogname), $message);
35
- }
36
-
37
- endif;
38
-
39
- if (empty($famne_options['send_password_change_email']) ) :
40
- return false;
41
- else :
42
- return true;
43
- endif;
44
- }
45
- add_filter('send_password_change_email', 'dont_send_password_change_email',1,3);
46
- endif;
47
-
48
-
49
- if (empty($famne_options['send_email_change_email']) && !function_exists('dont_send_email_change_email') ) :
50
- /**
51
- * Email users e-mail change notification to registered user.
52
- *
53
- */
54
- //echo "dont_send_email_change_email off";
55
- function dont_send_email_change_email( $send=false, $user='', $userdata='')
56
- {
57
- return false;
58
- }
59
- add_filter('send_email_change_email', 'dont_send_email_change_email',1,3);
60
- endif;
61
-
62
-
63
-
64
- if (!function_exists('wp_new_user_notification') ) :
65
- /**
66
- * Email login credentials to a newly-registered user.
67
- *
68
- * A new user registration notification is also sent to admin email.
69
- */
70
- //echo "wp_new_user_notification off";
71
- function wp_new_user_notification( $user_id, $notify = '' ) {
72
-
73
- global $famne_options;
74
-
75
- if (!empty($famne_options['wp_new_user_notification_to_admin']))
76
- {
77
- fa_new_user_notification_to_admin($user_id);
78
- }
79
-
80
- if (!empty($famne_options['wp_new_user_notification_to_user']))
81
- {
82
- fa_new_user_notification_to_user($user_id);
83
- }
84
- }
85
- endif;
86
-
87
- if (empty($famne_options['wp_notify_postauthor']) && !function_exists('wp_notify_postauthor') ) :
88
- /**
89
- * Notify an author (and/or others) of a comment/trackback/pingback on a post.
90
- */
91
- //echo "wp_notify_postauthor off";
92
- function wp_notify_postauthor( $comment_id, $deprecated = null ) {}
93
- endif;
94
-
95
- if (empty($famne_options['wp_notify_moderator']) && !function_exists('wp_notify_moderator') ) :
96
- /**
97
- * Notifies the moderator of the blog about a new comment that is awaiting approval.
98
- */
99
- //echo "wp_notify_moderator off";
100
- function wp_notify_moderator($comment_id) {}
101
- endif;
102
-
103
-
104
-
105
-
106
- if (empty($famne_options['wp_password_change_notification']) && !function_exists('wp_password_change_notification') ) :
107
- /**
108
- * Notify the blog admin of a user changing password, normally via email.
109
- */
110
- function wp_password_change_notification($user) {}
111
-
112
-
113
- endif;
114
-
115
-
116
-
117
- if ((empty($famne_options['send_password_forgotten_email']) || empty($famne_options['send_password_admin_forgotten_email'])) && !function_exists('dont_send_password_forgotten_email') ) :
118
- /**
119
- * Email forgotten password notification to registered user.
120
- *
121
- */
122
- //echo "dont_send_password_forgotten_email off";exit;
123
- function dont_send_password_forgotten_email( $send=true, $user_id=0 )
124
- {
125
- global $famne_options;
126
-
127
- $is_administrator = fa_user_is_administrator($user_id);
128
-
129
- if ($is_administrator && empty($famne_options['send_password_admin_forgotten_email']))
130
- {
131
- // stop sending admin forgot email
132
- return false;
133
- }
134
- if (!$is_administrator && empty($famne_options['send_password_forgotten_email']))
135
- {
136
- // stop sending user forgot email
137
- return false;
138
- }
139
- // none of the above so give the default status back
140
- return $send;
141
- }
142
- add_filter('allow_password_reset', 'dont_send_password_forgotten_email',1,3);
143
- endif;
144
-
145
-
146
-
147
-
148
-
149
-
150
- function fa_new_user_notification_to_admin ($user_id)
151
- {
152
-
153
- //Most parts of this function are copied form pluggable.php
154
-
155
- global $wpdb;
156
- $user = get_userdata( $user_id );
157
-
158
- // The blogname option is escaped with esc_html on the way into the database in sanitize_option
159
- // we want to reverse this for the plain text arena of emails.
160
- $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
161
-
162
- $message = sprintf(__('New user registration on your site %s:'), $blogname) . "\r\n\r\n";
163
- $message .= sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n";
164
- $message .= sprintf(__('E-mail: %s'), $user->user_email) . "\r\n";
165
-
166
-
167
- @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message);
168
- }
169
-
170
-
171
- function fa_new_user_notification_to_user($user_id)
172
- {
173
- global $wpdb;
174
- $user = get_userdata( $user_id );
175
-
176
- // The blogname option is escaped with esc_html on the way into the database in sanitize_option
177
- // we want to reverse this for the plain text arena of emails.
178
- $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
179
-
180
-
181
- // Generate something random for a password reset key.
182
- $key = wp_generate_password( 20, false );
183
-
184
- /** This action is documented in wp-login.php */
185
- do_action( 'retrieve_password_key', $user->user_login, $key );
186
-
187
- // Now insert the key, hashed, into the DB.
188
- if ( empty( $wp_hasher ) ) {
189
- require_once ABSPATH . WPINC . '/class-phpass.php';
190
- $wp_hasher = new PasswordHash( 8, true );
191
- }
192
- $hashed = time() . ':' . $wp_hasher->HashPassword( $key );
193
- $wpdb->update( $wpdb->users, array( 'user_activation_key' => $hashed ), array( 'user_login' => $user->user_login ) );
194
-
195
- $message = sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n";
196
- $message .= __('To set your password, visit the following address:') . "\r\n\r\n";
197
- $message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user->user_login), 'login') . ">\r\n\r\n";
198
-
199
- $message .= wp_login_url() . "\r\n";
200
-
201
- wp_mail($user->user_email, sprintf(__('[%s] Your username and password info'), $blogname), $message);
202
- }
203
-
204
- function fa_user_is_administrator($user_id=0)
205
- {
206
- $user = new WP_User( intval($user_id) );
207
- $is_administrator = false;
208
- if ( !empty( $user->roles ) && is_array( $user->roles ) ) {
209
- foreach ( $user->roles as $role )
210
- if ( strtolower($role) == 'administrator') $is_administrator = true;
211
- }
212
- return $is_administrator;
213
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
index.php CHANGED
@@ -1 +1 @@
1
- <?php // there is nothing to see here! ?>
1
+ <?php // there is nothing to see here!
languages/manage-notification-emails-en.mo ADDED
Binary file
languages/manage-notification-emails-en.po ADDED
@@ -0,0 +1,486 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Manage Notification E-mails\n"
4
+ "POT-Creation-Date: 2021-05-24 21:56+0200\n"
5
+ "PO-Revision-Date: 2021-05-24 21:59+0200\n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: \n"
8
+ "Language: en\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 2.4.2\n"
13
+ "X-Poedit-Basepath: ..\n"
14
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+ "X-Poedit-KeywordsList: __;_e;esc_attr_e\n"
16
+ "X-Poedit-SearchPath-0: .\n"
17
+ "X-Poedit-SearchPath-1: .\n"
18
+
19
+ #: core/functions.setup.php:27
20
+ msgid "Donate"
21
+ msgstr "Donate"
22
+
23
+ #: modules/custom-recipients.php:47
24
+ msgid "Extra admin recipients"
25
+ msgstr "Extra admin recipients"
26
+
27
+ #: modules/custom-recipients.php:48
28
+ msgid ""
29
+ "Here you can add extra admin recipients who will also receive all admin "
30
+ "notifications."
31
+ msgstr ""
32
+ "Here you can add extra admin recipients who will also receive all admin "
33
+ "notifications."
34
+
35
+ #: modules/custom-recipients.php:49
36
+ msgid "E-mail address(es)"
37
+ msgstr "E-mail address(es)"
38
+
39
+ #: modules/export-settings.php:52
40
+ msgid "Export and import settings"
41
+ msgstr "Export and import settings"
42
+
43
+ #: modules/export-settings.php:53
44
+ msgid ""
45
+ "Here you can export or import your Manage notification e-mails settings."
46
+ msgstr ""
47
+ "Here you can export or import your Manage notification e-mails settings."
48
+
49
+ #: modules/export-settings.php:57
50
+ msgid "Do you want to overwrite your current settings?"
51
+ msgstr "Do you want to overwrite your current settings?"
52
+
53
+ #: modules/export-settings.php:58
54
+ msgid "Start import"
55
+ msgstr "Start import"
56
+
57
+ #: modules/export-settings.php:97
58
+ msgid "Error uploading file. Please try again."
59
+ msgstr "Error uploading file. Please try again."
60
+
61
+ #: modules/export-settings.php:102
62
+ msgid "Incorrect file type."
63
+ msgstr "Incorrect file type."
64
+
65
+ #: modules/export-settings.php:108
66
+ msgid "File size exceeds maximum upload limit."
67
+ msgstr "File size exceeds maximum upload limit."
68
+
69
+ #: modules/export-settings.php:120
70
+ msgid "Import file empty."
71
+ msgstr "Import file empty."
72
+
73
+ #: modules/export-settings.php:128
74
+ msgid "The import file has a different plugin version."
75
+ msgstr "The import file has a different plugin version."
76
+
77
+ #: modules/pluggable/pluggable-functions-1.2.php:30
78
+ #: modules/pluggable/pluggable-functions-1.3.php:34
79
+ #: modules/pluggable/pluggable-functions-1.5.php:44
80
+ #, php-format
81
+ msgid "Password Lost and Changed for user: %s"
82
+ msgstr "Password Lost and Changed for user: %s"
83
+
84
+ #: modules/pluggable/pluggable-functions-1.2.php:34
85
+ #: modules/pluggable/pluggable-functions-1.3.php:38
86
+ #: modules/pluggable/pluggable-functions-1.5.php:48
87
+ #, php-format
88
+ msgid "[%s] Password Lost/Changed"
89
+ msgstr "[%s] Password Lost/Changed"
90
+
91
+ #: modules/pluggable/pluggable-functions-1.2.php:162
92
+ #: modules/pluggable/pluggable-functions-1.3.php:185
93
+ #: modules/pluggable/pluggable-functions-1.5.php:200
94
+ #, php-format
95
+ msgid "New user registration on your site %s:"
96
+ msgstr "New user registration on your site %s:"
97
+
98
+ #: modules/pluggable/pluggable-functions-1.2.php:163
99
+ #: modules/pluggable/pluggable-functions-1.2.php:195
100
+ #: modules/pluggable/pluggable-functions-1.3.php:186
101
+ #: modules/pluggable/pluggable-functions-1.3.php:232
102
+ #: modules/pluggable/pluggable-functions-1.5.php:202
103
+ #: modules/pluggable/pluggable-functions-1.5.php:286
104
+ #, php-format
105
+ msgid "Username: %s"
106
+ msgstr "Username: %s"
107
+
108
+ #: modules/pluggable/pluggable-functions-1.2.php:164
109
+ #, php-format
110
+ msgid "E-mail: %s"
111
+ msgstr "E-mail: %s"
112
+
113
+ #: modules/pluggable/pluggable-functions-1.2.php:167
114
+ #: modules/pluggable/pluggable-functions-1.3.php:189
115
+ #: modules/pluggable/pluggable-functions-1.5.php:209
116
+ #, php-format
117
+ msgid "[%s] New User Registration"
118
+ msgstr "[%s] New User Registration"
119
+
120
+ #: modules/pluggable/pluggable-functions-1.2.php:196
121
+ #: modules/pluggable/pluggable-functions-1.3.php:233
122
+ #: modules/pluggable/pluggable-functions-1.5.php:287
123
+ msgid "To set your password, visit the following address:"
124
+ msgstr "To set your password, visit the following address:"
125
+
126
+ #: modules/pluggable/pluggable-functions-1.2.php:201
127
+ #: modules/pluggable/pluggable-functions-1.3.php:238
128
+ #, php-format
129
+ msgid "[%s] Your username and password info"
130
+ msgstr "[%s] Your username and password info"
131
+
132
+ #: modules/pluggable/pluggable-functions-1.3.php:187
133
+ #: modules/pluggable/pluggable-functions-1.5.php:204
134
+ #, php-format
135
+ msgid "Email: %s"
136
+ msgstr "Email: %s"
137
+
138
+ #: modules/pluggable/pluggable-functions-1.5.php:295
139
+ #, php-format
140
+ msgid "[%s] Login Details"
141
+ msgstr "[%s] Login Details"
142
+
143
+ #: modules/settings-page/class.FAMNESettingsPage.php:100
144
+ msgid "Network options"
145
+ msgstr "Network options"
146
+
147
+ #: modules/settings-page/class.FAMNESettingsPage.php:110
148
+ msgid "Core options"
149
+ msgstr "Core options"
150
+
151
+ #: modules/settings-page/class.FAMNESettingsPage.php:116
152
+ msgid "Modules"
153
+ msgstr "Modules"
154
+
155
+ #: modules/settings-page/class.FAMNESettingsPage.php:122
156
+ #: modules/settings-page/views/extra.php:23
157
+ msgid "Information"
158
+ msgstr "Information"
159
+
160
+ #: modules/settings-page/class.FAMNESettingsPage.php:368
161
+ msgid "Settings"
162
+ msgstr "Settings"
163
+
164
+ #: modules/settings-page/views/container-network.php:21
165
+ #: modules/settings-page/views/container.php:23
166
+ msgid "Manage the notification e-mails"
167
+ msgstr "Manage the notification e-mails"
168
+
169
+ #: modules/settings-page/views/container-network.php:21
170
+ #: modules/settings-page/views/container.php:23
171
+ msgid "version"
172
+ msgstr "version"
173
+
174
+ #: modules/settings-page/views/container-network.php:26
175
+ #: modules/settings-page/views/container.php:37
176
+ msgid "Manage your notification e-mail preferences below."
177
+ msgstr "Manage your notification e-mail preferences below."
178
+
179
+ #: modules/settings-page/views/container.php:30
180
+ msgid "Site managed by network manager"
181
+ msgstr "Site managed by network manager"
182
+
183
+ #: modules/settings-page/views/container.php:31
184
+ msgid ""
185
+ "Manage notification e-mails settings for this site are globally managed in "
186
+ "the multisite network settings menu."
187
+ msgstr ""
188
+ "Manage notification e-mails settings for this site are globally managed in "
189
+ "the multisite network settings menu."
190
+
191
+ #: modules/settings-page/views/donatebox.php:18
192
+ msgid "If you find this plugin useful, you can show your appreciation here :-)"
193
+ msgstr ""
194
+ "If you find this plugin useful, you can show your appreciation here :-)"
195
+
196
+ #: modules/settings-page/views/extra.php:25
197
+ msgid "Available Manage Notification E-mail Modules"
198
+ msgstr "Available Manage Notification E-mail Modules"
199
+
200
+ #: modules/settings-page/views/modules.php:24
201
+ msgid "Extra modules"
202
+ msgstr "Extra modules"
203
+
204
+ #: modules/settings-page/views/modules.php:25
205
+ msgid ""
206
+ "The modules below are options which are not available in WordPress by "
207
+ "default."
208
+ msgstr ""
209
+ "The modules below are options which are not available in WordPress by "
210
+ "default."
211
+
212
+ #: modules/settings-page/views/modules.php:39
213
+ msgid "Multisite managed settings available"
214
+ msgstr "Multisite managed settings available"
215
+
216
+ #: modules/settings-page/views/modules.php:40
217
+ msgid ""
218
+ "For this environment, it is possible for you to manage all settings globally "
219
+ "in the network settings menu."
220
+ msgstr ""
221
+ "For this environment, it is possible for you to manage all settings globally "
222
+ "in the network settings menu."
223
+
224
+ #: modules/settings-page/views/network.php:29
225
+ msgid "Manage multisite options"
226
+ msgstr "Manage multisite options"
227
+
228
+ #: modules/settings-page/views/network.php:30
229
+ msgid ""
230
+ "Here you can choose to manage all options for this plugin in one location. "
231
+ "No hassle with toggling options on and off for each subsite individually."
232
+ msgstr ""
233
+ "Here you can choose to manage all options for this plugin in one location. "
234
+ "No hassle with toggling options on and off for each subsite individually."
235
+
236
+ #: modules/settings-page/views/network.php:33
237
+ msgid "Use the network settings."
238
+ msgstr "Use the network settings."
239
+
240
+ #: modules/settings-page/views/network.php:33
241
+ msgid ""
242
+ "Checking this option will disable per site management. All sites will use "
243
+ "these global network settings."
244
+ msgstr ""
245
+ "Checking this option will disable per site management. All sites will use "
246
+ "these global network settings."
247
+
248
+ #: modules/settings-page/views/settings.php:22
249
+ msgid "Options for e-mails to users"
250
+ msgstr "Options for e-mails to users"
251
+
252
+ #: modules/settings-page/views/settings.php:25
253
+ msgid "New user notification to user"
254
+ msgstr "New user notification to user"
255
+
256
+ #: modules/settings-page/views/settings.php:25
257
+ msgid "Send e-mail with login credentials to a newly-registered user."
258
+ msgstr "Send e-mail with login credentials to a newly-registered user."
259
+
260
+ #: modules/settings-page/views/settings.php:26
261
+ msgid "Notify post author"
262
+ msgstr "Notify post author"
263
+
264
+ #: modules/settings-page/views/settings.php:26
265
+ msgid ""
266
+ "Send e-mail to an author (and/or others) of a comment/trackback/pingback on "
267
+ "a post."
268
+ msgstr ""
269
+ "Send e-mail to an author (and/or others) of a comment/trackback/pingback on "
270
+ "a post."
271
+
272
+ #: modules/settings-page/views/settings.php:27
273
+ msgid "Notify moderator"
274
+ msgstr "Notify moderator"
275
+
276
+ #: modules/settings-page/views/settings.php:27
277
+ msgid ""
278
+ "Send e-mail to the moderator of the blog about a new comment that is "
279
+ "awaiting approval."
280
+ msgstr ""
281
+ "Send e-mail to the moderator of the blog about a new comment that is "
282
+ "awaiting approval."
283
+
284
+ #: modules/settings-page/views/settings.php:28
285
+ msgid "Password change notification to user"
286
+ msgstr "Password change notification to user"
287
+
288
+ #: modules/settings-page/views/settings.php:28
289
+ msgid ""
290
+ "Send e-mail to registered user about changing his or her password. Be "
291
+ "careful with this option, because when unchecked, the forgotten password "
292
+ "request e-mails will be blocked too."
293
+ msgstr ""
294
+ "Send e-mail to registered user about changing his or her password. Be "
295
+ "careful with this option, because when unchecked, the forgotten password "
296
+ "request e-mails will be blocked too."
297
+
298
+ #: modules/settings-page/views/settings.php:29
299
+ msgid "E-mail address change notification to user"
300
+ msgstr "E-mail address change notification to user"
301
+
302
+ #: modules/settings-page/views/settings.php:29
303
+ msgid ""
304
+ "Send e-mail to registered user about changing his or her E-mail address."
305
+ msgstr ""
306
+ "Send e-mail to registered user about changing his or her E-mail address."
307
+
308
+ #: modules/settings-page/views/settings.php:30
309
+ msgid "Password forgotten e-mail to user"
310
+ msgstr "Password forgotten e-mail to user"
311
+
312
+ #: modules/settings-page/views/settings.php:30
313
+ msgid ""
314
+ "Send the forgotten password e-mail to registered user.<br/>(To prevent "
315
+ "locking yourself out, sending of the forgotten password e-mail for "
316
+ "administrators will still work)"
317
+ msgstr ""
318
+ "Send the forgotten password e-mail to registered user.<br/>(To prevent "
319
+ "locking yourself out, sending of the forgotten password e-mail for "
320
+ "administrators will still work)"
321
+
322
+ #: modules/settings-page/views/settings.php:34
323
+ msgid "Options for e-mails to administrators"
324
+ msgstr "Options for e-mails to administrators"
325
+
326
+ #: modules/settings-page/views/settings.php:38
327
+ msgid "New user notification to admin"
328
+ msgstr "New user notification to admin"
329
+
330
+ #: modules/settings-page/views/settings.php:38
331
+ msgid "Sends an e-mail to the site admin after a new user is registered."
332
+ msgstr "Sends an e-mail to the site admin after a new user is registered."
333
+
334
+ #: modules/settings-page/views/settings.php:39
335
+ msgid "Password change notification to admin"
336
+ msgstr "Password change notification to admin"
337
+
338
+ #: modules/settings-page/views/settings.php:39
339
+ msgid "Send e-mail to the blog admin of a user changing his or her password."
340
+ msgstr "Send e-mail to the blog admin of a user changing his or her password."
341
+
342
+ #: modules/settings-page/views/settings.php:41
343
+ msgid "automatic WordPress core update e-mail"
344
+ msgstr "automatic WordPress core update e-mail"
345
+
346
+ #: modules/settings-page/views/settings.php:41
347
+ msgid ""
348
+ "Sends an e-mail after a successful automatic WordPress core update to "
349
+ "administrators. E-mails about failed updates will always be sent to the "
350
+ "administrators and cannot be disabled."
351
+ msgstr ""
352
+ "Sends an e-mail after a successful automatic WordPress core update to "
353
+ "administrators. E-mails about failed updates will always be sent to the "
354
+ "administrators and cannot be disabled."
355
+
356
+ #: modules/settings-page/views/settings.php:42
357
+ msgid "Automatic WordPress plugin update e-mail"
358
+ msgstr "Automatic WordPress plugin update e-mail"
359
+
360
+ #: modules/settings-page/views/settings.php:42
361
+ msgid ""
362
+ "Sends an e-mail after a successful automatic plugin update to "
363
+ "administrators. E-mails about failed plugin updates will always be sent to "
364
+ "the administrators"
365
+ msgstr ""
366
+ "Sends an e-mail after a successful automatic plugin update to "
367
+ "administrators. E-mails about failed plugin updates will always be sent to "
368
+ "the administrators"
369
+
370
+ #: modules/settings-page/views/settings.php:43
371
+ msgid "Automatic WordPress theme update e-mail"
372
+ msgstr "Automatic WordPress theme update e-mail"
373
+
374
+ #: modules/settings-page/views/settings.php:43
375
+ msgid ""
376
+ "Sends an e-mail after a successful automatic theme update to administrators. "
377
+ "E-mails about failed theme updates will always be sent to the administrators"
378
+ msgstr ""
379
+ "Sends an e-mail after a successful automatic theme update to administrators. "
380
+ "E-mails about failed theme updates will always be sent to the administrators"
381
+
382
+ #: modules/settings-page/views/settings.php:50
383
+ msgid "Password forgotten e-mail to administrator"
384
+ msgstr "Password forgotten e-mail to administrator"
385
+
386
+ #: modules/settings-page/views/settings.php:50
387
+ msgid "Send the forgotten password e-mail to administrators."
388
+ msgstr "Send the forgotten password e-mail to administrators."
389
+
390
+ #: modules/settings-page/views/settings.php:50
391
+ msgid ""
392
+ "Okay, this is a <strong style=\"color:#900\">DANGEROUS OPTION !</strong><br/"
393
+ "> So be warned, because unchecking this option prevents sending out the "
394
+ "forgotten password e-mail to all administrators. So hold on to your own "
395
+ "password and uncheck this one at your own risk ;-)"
396
+ msgstr ""
397
+ "Okay, this is a <strong style=\"color:#900\">DANGEROUS OPTION !</strong><br/"
398
+ "> So be warned, because unchecking this option prevents sending out the "
399
+ "forgotten password e-mail to all administrators. So hold on to your own "
400
+ "password and uncheck this one at your own risk ;-)"
401
+
402
+ #: modules/settings-page/views/settings.php:54
403
+ msgid "Reset settings"
404
+ msgstr "Reset settings"
405
+
406
+ #: modules/user-email-changed.php:53
407
+ msgid "E-mail address changed by user"
408
+ msgstr "E-mail address changed by user"
409
+
410
+ #: modules/user-email-changed.php:54
411
+ msgid "Request to change e-mailadress notification to admin"
412
+ msgstr "Request to change e-mailadress notification to admin"
413
+
414
+ #: modules/user-email-changed.php:54
415
+ msgid ""
416
+ "Sends an e-mail to administrators after a user requested to update his or "
417
+ "her e-mailaddress."
418
+ msgstr ""
419
+ "Sends an e-mail to administrators after a user requested to update his or "
420
+ "her e-mailaddress."
421
+
422
+ #: modules/user-email-changed.php:55
423
+ msgid "User changed (confirmed) e-mail notification to admin"
424
+ msgstr "User changed (confirmed) e-mail notification to admin"
425
+
426
+ #: modules/user-email-changed.php:55
427
+ msgid ""
428
+ "Sends an e-mail to administrators after a user successfully updated his or "
429
+ "her e-mailaddress."
430
+ msgstr ""
431
+ "Sends an e-mail to administrators after a user successfully updated his or "
432
+ "her e-mailaddress."
433
+
434
+ #: modules/user-email-changed.php:79
435
+ msgid ""
436
+ "Howdy admin,\n"
437
+ " \n"
438
+ " Recently a user requested to have his email address on his account "
439
+ "changed.\n"
440
+ "\n"
441
+ " An email change request has been sent to ###EMAIL###\n"
442
+ " \n"
443
+ " Regards,\n"
444
+ " All at ###SITENAME###\n"
445
+ " ###SITEURL###"
446
+ msgstr ""
447
+ "Howdy admin,\n"
448
+ " \n"
449
+ " Recently a user requested to have his email address on his account "
450
+ "changed.\n"
451
+ "\n"
452
+ " An email change request has been sent to ###EMAIL###\n"
453
+ " \n"
454
+ " Regards,\n"
455
+ " All at ###SITENAME###\n"
456
+ " ###SITEURL###"
457
+
458
+ #: modules/user-email-changed.php:94
459
+ #, php-format
460
+ msgid "[%s] User requested Email Change"
461
+ msgstr "[%s] User requested Email Change"
462
+
463
+ #: modules/user-email-changed.php:115
464
+ msgid ""
465
+ "Hi admin,\n"
466
+ "\n"
467
+ " This notice confirms that the user ###USERNAME### changed his email "
468
+ "address on ###SITENAME### from ###EMAIL### to ###NEW_EMAIL###.\n"
469
+ "\n"
470
+ " Regards,\n"
471
+ " All at ###SITENAME###\n"
472
+ " ###SITEURL###"
473
+ msgstr ""
474
+ "Hi admin,\n"
475
+ "\n"
476
+ " This notice confirms that the user ###USERNAME### changed his email "
477
+ "address on ###SITENAME### from ###EMAIL### to ###NEW_EMAIL###.\n"
478
+ "\n"
479
+ " Regards,\n"
480
+ " All at ###SITENAME###\n"
481
+ " ###SITEURL###"
482
+
483
+ #: modules/user-email-changed.php:130
484
+ #, php-format
485
+ msgid "[%s] User Email Changed"
486
+ msgstr "[%s] User Email Changed"
languages/manage-notification-emails-nl_NL.mo CHANGED
Binary file
languages/manage-notification-emails-nl_NL.po CHANGED
@@ -2,9 +2,11 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Famne\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: \n"
6
- "PO-Revision-Date: 2018-10-19 22:36+0200\n"
7
- "Language-Team: \n"
 
 
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -14,82 +16,257 @@ msgstr ""
14
  "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
15
  "X-Poedit-Basepath: ..\n"
16
  "X-Textdomain-Support: yes\n"
17
- "X-Generator: Poedit 2.2\n"
18
- "Last-Translator: \n"
19
- "Language: nl\n"
20
  "X-Poedit-SearchPath-0: .\n"
21
 
22
- #: includes/class.FAMNESettingsPage.php:62
23
- msgid "Manage the notification e-mails"
24
- msgstr "Beheer notificatie e-mails"
25
 
26
- #: includes/class.FAMNESettingsPage.php:73
27
- msgid "If you find this plugin useful, you can show your appreciation here :-)"
28
- msgstr "Geef een kleine donatie als je deze plugin handig vindt"
29
 
30
- #: includes/class.FAMNESettingsPage.php:106
31
- msgid "New user notification to admin"
32
- msgstr "Nieuwe gebruiker notificatie aan sitebeheerder"
 
 
 
 
33
 
34
- #: includes/class.FAMNESettingsPage.php:114
35
- msgid "New user notification to user"
36
- msgstr "Nieuwe gebruiker notificatie aan gebruiker"
37
 
38
- #: includes/class.FAMNESettingsPage.php:122
39
- msgid "Notify post author"
40
- msgstr "Notificeer bericht schrijver"
41
 
42
- #: includes/class.FAMNESettingsPage.php:130
43
- msgid "Notify moderator"
44
- msgstr "Notificeer moderator"
 
 
 
45
 
46
- #: includes/class.FAMNESettingsPage.php:138
47
- msgid "Password change notification to admin"
48
- msgstr "Wijziging wachtwoord notificatie aan sitebeheerder"
49
 
50
- #: includes/class.FAMNESettingsPage.php:146
51
- msgid "Password change notification to user"
52
- msgstr "Wijziging wachtwoord notificatie aan gebruiker"
53
 
54
- #: includes/class.FAMNESettingsPage.php:154
55
- msgid "E-mail address change notification to user"
56
- msgstr "E-mailadres wijziging notificatie aan gebruiker"
57
 
58
- #: includes/class.FAMNESettingsPage.php:162
59
- msgid "Password forgotten e-mail to user"
60
- msgstr "Wachtwoord vergeten e-mail aan gebruiker"
61
 
62
- #: includes/class.FAMNESettingsPage.php:170
63
- msgid "Password forgotten e-mail to administrator"
64
- msgstr "Wachtwoord vergeten e-mail aan sitebeheerder"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
 
66
- #: includes/class.FAMNESettingsPage.php:199
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  msgid "Manage your notification e-mail preferences below."
68
  msgstr "Beheer hieronder jouw notificatie e-mail voorkeuren."
69
 
70
- #: includes/class.FAMNESettingsPage.php:201
71
- msgid "By unchecking the checkbox you prevent sending the specific e-mails."
 
 
 
 
 
 
72
  msgstr ""
73
- "Door de aanvinkbox niet aan te vinden voorkom je het verzenden van de "
74
- "specifieke e-mails."
75
 
76
- #: includes/class.FAMNESettingsPage.php:213
77
- msgid "Enable sending e-mail"
78
- msgstr "E-mail verzenden activeren"
79
 
80
- #: includes/class.FAMNESettingsPage.php:220
81
- msgid "Sends an e-mail to the site admin after a new user is registered."
 
 
 
 
 
 
 
 
 
 
82
  msgstr ""
83
- "Verstuur een e-mail naar de sitebeheerder zodra er een nieuwe gebruiker is "
84
- "geregistreerd."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
 
86
- #: includes/class.FAMNESettingsPage.php:225
 
 
 
 
87
  msgid "Send e-mail with login credentials to a newly-registered user."
88
  msgstr ""
89
  "Verstuur een e-mail met login gegevens naar een nieuw geregistreerde "
90
  "gebruiker."
91
 
92
- #: includes/class.FAMNESettingsPage.php:230
 
 
 
 
93
  msgid ""
94
  "Send e-mail to an author (and/or others) of a comment/trackback/pingback on "
95
  "a post."
@@ -97,7 +274,11 @@ msgstr ""
97
  "Verstuur een e-mail naar de auteur (en/of anderen) van een comment/trackback/"
98
  "pingback op een bericht."
99
 
100
- #: includes/class.FAMNESettingsPage.php:235
 
 
 
 
101
  msgid ""
102
  "Send e-mail to the moderator of the blog about a new comment that is "
103
  "awaiting approval."
@@ -105,13 +286,11 @@ msgstr ""
105
  "Verstuur een e-mail naar de moderator van het blog over een nieuwe comment "
106
  "welke op een goedkeuring wacht."
107
 
108
- #: includes/class.FAMNESettingsPage.php:240
109
- msgid "Send e-mail to the blog admin of a user changing his or her password."
110
- msgstr ""
111
- "Verstuur een e-mail naar de sitebeheerder van een gebruiker welke zijn "
112
- "wachtwoord heeft aangepast."
113
 
114
- #: includes/class.FAMNESettingsPage.php:245
115
  msgid ""
116
  "Send e-mail to registered user about changing his or her password. Be "
117
  "careful with this option, because when unchecked, the forgotten password "
@@ -122,14 +301,22 @@ msgstr ""
122
  "aangevinkt, de vergeten wachtwoord e-mails aanvragen ook worden geblokkeerd "
123
  "en dus niet verzonden."
124
 
125
- #: includes/class.FAMNESettingsPage.php:250
 
 
 
 
126
  msgid ""
127
  "Send e-mail to registered user about changing his or her E-mail address."
128
  msgstr ""
129
  "Verstuur een e-mail naar een geregistreerde gebruiker over het aanpassen van "
130
  "zijn of haar e-mailadres."
131
 
132
- #: includes/class.FAMNESettingsPage.php:255
 
 
 
 
133
  msgid ""
134
  "Send the forgotten password e-mail to registered user.<br/>(To prevent "
135
  "locking yourself out, sending of the forgotten password e-mail for "
@@ -137,16 +324,175 @@ msgid ""
137
  msgstr ""
138
  "Verstuur het vergeten wachtwoord e-mail naar de geregistreerde gebruiker."
139
 
140
- #: includes/class.FAMNESettingsPage.php:259
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
  msgid ""
142
- "Send the forgotten password e-mail to administrators. Okay, this is a "
143
- "<strong style=\"color:#900\">DANGEROUS OPTION !</strong><br/> So be warned, "
144
- "because unchecking this option prevents sending out the forgotten password e-"
145
- "mail to all administrators. So hold on to your own password and uncheck this "
146
- "one at your own risk ;-)"
147
  msgstr ""
148
- "Verstuur het vergeten wachtwoord e-mail aan sitebeheerders. Okee, dit is een "
149
- "<strong style=\"color:#900\">GEVAARLIJKE OPTIE !</strong><br/>Dus wees "
150
- "gewaarschuwd, omdat bij het niet aanvinken van deze optie het vergeten "
151
- "wachtwoord e-mail niet meer wordt verstuurd naar sitebeheerders. Dus houdt "
152
- "je wachtwoord bij de hand en vink deze optie uit op eigen risico ;-)"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  msgstr ""
3
  "Project-Id-Version: Famne\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2021-05-24 21:59+0200\n"
6
+ "PO-Revision-Date: 2021-05-24 22:13+0200\n"
7
+ "Last-Translator: \n"
8
+ "Language-Team: Dutch\n"
9
+ "Language: nl_NL\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
16
  "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
17
  "X-Poedit-Basepath: ..\n"
18
  "X-Textdomain-Support: yes\n"
19
+ "X-Generator: Poedit 2.4.2\n"
 
 
20
  "X-Poedit-SearchPath-0: .\n"
21
 
22
+ #: core/functions.setup.php:27
23
+ msgid "Donate"
24
+ msgstr "Doneer"
25
 
26
+ #: modules/custom-recipients.php:47
27
+ msgid "Extra admin recipients"
28
+ msgstr "Extra admin adressen"
29
 
30
+ #: modules/custom-recipients.php:48
31
+ msgid ""
32
+ "Here you can add extra admin recipients who will also receive all admin "
33
+ "notifications."
34
+ msgstr ""
35
+ "Hier kun je extra admin ontvangers toevoegen. Zij ontvangen ook alle admin "
36
+ "notificaties."
37
 
38
+ #: modules/custom-recipients.php:49
39
+ msgid "E-mail address(es)"
40
+ msgstr "E-mailadres(sen)"
41
 
42
+ #: modules/export-settings.php:52
43
+ msgid "Export and import settings"
44
+ msgstr "Export en import instellingen"
45
 
46
+ #: modules/export-settings.php:53
47
+ msgid ""
48
+ "Here you can export or import your Manage notification e-mails settings."
49
+ msgstr ""
50
+ "Hier kun je de instellingen van Manage Notification e-mails importeren en "
51
+ "exporteren."
52
 
53
+ #: modules/export-settings.php:57
54
+ msgid "Do you want to overwrite your current settings?"
55
+ msgstr "Wil je de huidige settings overschrijven?"
56
 
57
+ #: modules/export-settings.php:58
58
+ msgid "Start import"
59
+ msgstr "Start importeren"
60
 
61
+ #: modules/export-settings.php:97
62
+ msgid "Error uploading file. Please try again."
63
+ msgstr "Fout bij uploaden van het bestand. Probeer het opnieuw."
64
 
65
+ #: modules/export-settings.php:102
66
+ msgid "Incorrect file type."
67
+ msgstr "Foutieve bestandstype."
68
 
69
+ #: modules/export-settings.php:108
70
+ msgid "File size exceeds maximum upload limit."
71
+ msgstr "Het bestand overschrijdt de maximale upload limiet."
72
+
73
+ #: modules/export-settings.php:120
74
+ msgid "Import file empty."
75
+ msgstr "Import bestand is leeg."
76
+
77
+ #: modules/export-settings.php:128
78
+ msgid "The import file has a different plugin version."
79
+ msgstr "Het import bestand heeft een andere plugin versie."
80
+
81
+ #: modules/pluggable/pluggable-functions-1.2.php:30
82
+ #: modules/pluggable/pluggable-functions-1.3.php:34
83
+ #: modules/pluggable/pluggable-functions-1.5.php:44
84
+ #, php-format
85
+ msgid "Password Lost and Changed for user: %s"
86
+ msgstr "Wachtwoord verloren en veranderd voor gebruiker: %s"
87
+
88
+ #: modules/pluggable/pluggable-functions-1.2.php:34
89
+ #: modules/pluggable/pluggable-functions-1.3.php:38
90
+ #: modules/pluggable/pluggable-functions-1.5.php:48
91
+ #, php-format
92
+ msgid "[%s] Password Lost/Changed"
93
+ msgstr "[%s] Wachtwoord verloren/veranderd"
94
+
95
+ #: modules/pluggable/pluggable-functions-1.2.php:162
96
+ #: modules/pluggable/pluggable-functions-1.3.php:185
97
+ #: modules/pluggable/pluggable-functions-1.5.php:200
98
+ #, php-format
99
+ msgid "New user registration on your site %s:"
100
+ msgstr "Nieuwe geregistreerde gebruiker op je website %s:"
101
+
102
+ #: modules/pluggable/pluggable-functions-1.2.php:163
103
+ #: modules/pluggable/pluggable-functions-1.2.php:195
104
+ #: modules/pluggable/pluggable-functions-1.3.php:186
105
+ #: modules/pluggable/pluggable-functions-1.3.php:232
106
+ #: modules/pluggable/pluggable-functions-1.5.php:202
107
+ #: modules/pluggable/pluggable-functions-1.5.php:286
108
+ #, php-format
109
+ msgid "Username: %s"
110
+ msgstr "Gebruikersnaam: %s"
111
+
112
+ #: modules/pluggable/pluggable-functions-1.2.php:164
113
+ #, php-format
114
+ msgid "E-mail: %s"
115
+ msgstr "E-mail: %s"
116
+
117
+ #: modules/pluggable/pluggable-functions-1.2.php:167
118
+ #: modules/pluggable/pluggable-functions-1.3.php:189
119
+ #: modules/pluggable/pluggable-functions-1.5.php:209
120
+ #, php-format
121
+ msgid "[%s] New User Registration"
122
+ msgstr "[%s] Nieuwe gebruiker registratie"
123
 
124
+ #: modules/pluggable/pluggable-functions-1.2.php:196
125
+ #: modules/pluggable/pluggable-functions-1.3.php:233
126
+ #: modules/pluggable/pluggable-functions-1.5.php:287
127
+ msgid "To set your password, visit the following address:"
128
+ msgstr "Om je wachtwoord te resetten, gebruik het volgende adres:"
129
+
130
+ #: modules/pluggable/pluggable-functions-1.2.php:201
131
+ #: modules/pluggable/pluggable-functions-1.3.php:238
132
+ #, php-format
133
+ msgid "[%s] Your username and password info"
134
+ msgstr "[%s] Jouw gebruikersnaam en wachtwoord informatie"
135
+
136
+ #: modules/pluggable/pluggable-functions-1.3.php:187
137
+ #: modules/pluggable/pluggable-functions-1.5.php:204
138
+ #, php-format
139
+ msgid "Email: %s"
140
+ msgstr "Email: %s"
141
+
142
+ #: modules/pluggable/pluggable-functions-1.5.php:295
143
+ #, php-format
144
+ msgid "[%s] Login Details"
145
+ msgstr "[%s] Login Details"
146
+
147
+ #: modules/settings-page/class.FAMNESettingsPage.php:100
148
+ msgid "Network options"
149
+ msgstr "Netwerk opties"
150
+
151
+ #: modules/settings-page/class.FAMNESettingsPage.php:110
152
+ msgid "Core options"
153
+ msgstr "Core opties"
154
+
155
+ #: modules/settings-page/class.FAMNESettingsPage.php:116
156
+ msgid "Modules"
157
+ msgstr "Modules"
158
+
159
+ #: modules/settings-page/class.FAMNESettingsPage.php:122
160
+ #: modules/settings-page/views/extra.php:23
161
+ msgid "Information"
162
+ msgstr "Informatie"
163
+
164
+ #: modules/settings-page/class.FAMNESettingsPage.php:368
165
+ msgid "Settings"
166
+ msgstr "Instellingen"
167
+
168
+ #: modules/settings-page/views/container-network.php:21
169
+ #: modules/settings-page/views/container.php:23
170
+ msgid "Manage the notification e-mails"
171
+ msgstr "Beheer notificatie e-mails"
172
+
173
+ #: modules/settings-page/views/container-network.php:21
174
+ #: modules/settings-page/views/container.php:23
175
+ msgid "version"
176
+ msgstr "versie"
177
+
178
+ #: modules/settings-page/views/container-network.php:26
179
+ #: modules/settings-page/views/container.php:37
180
  msgid "Manage your notification e-mail preferences below."
181
  msgstr "Beheer hieronder jouw notificatie e-mail voorkeuren."
182
 
183
+ #: modules/settings-page/views/container.php:30
184
+ msgid "Site managed by network manager"
185
+ msgstr "Website beheert door netwerk beheerder"
186
+
187
+ #: modules/settings-page/views/container.php:31
188
+ msgid ""
189
+ "Manage notification e-mails settings for this site are globally managed in "
190
+ "the multisite network settings menu."
191
  msgstr ""
192
+ "Manage notification e-mails instelling voor deze site worden globaal beheerd "
193
+ "in de multisite netwerk instellingen menu."
194
 
195
+ #: modules/settings-page/views/donatebox.php:18
196
+ msgid "If you find this plugin useful, you can show your appreciation here :-)"
197
+ msgstr "Geef een kleine donatie als je deze plugin handig vindt"
198
 
199
+ #: modules/settings-page/views/extra.php:25
200
+ msgid "Available Manage Notification E-mail Modules"
201
+ msgstr "Beschikbare Manage Notification E-mail Modules"
202
+
203
+ #: modules/settings-page/views/modules.php:24
204
+ msgid "Extra modules"
205
+ msgstr "Extra modules"
206
+
207
+ #: modules/settings-page/views/modules.php:25
208
+ msgid ""
209
+ "The modules below are options which are not available in WordPress by "
210
+ "default."
211
  msgstr ""
212
+ "De modules hieronder zijn opties de niet standaard beschikbaar zijn in "
213
+ "WordPress."
214
+
215
+ #: modules/settings-page/views/modules.php:39
216
+ msgid "Multisite managed settings available"
217
+ msgstr "Multisite beheer instellingen zijn beschikbaar"
218
+
219
+ #: modules/settings-page/views/modules.php:40
220
+ msgid ""
221
+ "For this environment, it is possible for you to manage all settings globally "
222
+ "in the network settings menu."
223
+ msgstr ""
224
+ "Voor deze omgeving is het mogelijk om al je instellingen globaal te beheren "
225
+ "in het netwerk instellingen menu."
226
+
227
+ #: modules/settings-page/views/network.php:29
228
+ msgid "Manage multisite options"
229
+ msgstr "Beheer multisite opties"
230
+
231
+ #: modules/settings-page/views/network.php:30
232
+ msgid ""
233
+ "Here you can choose to manage all options for this plugin in one location. "
234
+ "No hassle with toggling options on and off for each subsite individually."
235
+ msgstr ""
236
+ "Hier kun je kiezen om alle opties te beheren vanuit een locatie. Geen gedoe "
237
+ "met het instellen van opties voor elke site apart."
238
+
239
+ #: modules/settings-page/views/network.php:33
240
+ msgid "Use the network settings."
241
+ msgstr "Gebruik de netwerk instellingen."
242
+
243
+ #: modules/settings-page/views/network.php:33
244
+ msgid ""
245
+ "Checking this option will disable per site management. All sites will use "
246
+ "these global network settings."
247
+ msgstr ""
248
+ "Het aanvinken van deze optie zet het beheren per site uit. Alle site worden "
249
+ "dan beheerd via deze globale netwerk instellingen."
250
+
251
+ #: modules/settings-page/views/settings.php:22
252
+ msgid "Options for e-mails to users"
253
+ msgstr "Opties voor e-mails aan administratoren"
254
 
255
+ #: modules/settings-page/views/settings.php:25
256
+ msgid "New user notification to user"
257
+ msgstr "Nieuwe gebruiker notificatie aan gebruiker"
258
+
259
+ #: modules/settings-page/views/settings.php:25
260
  msgid "Send e-mail with login credentials to a newly-registered user."
261
  msgstr ""
262
  "Verstuur een e-mail met login gegevens naar een nieuw geregistreerde "
263
  "gebruiker."
264
 
265
+ #: modules/settings-page/views/settings.php:26
266
+ msgid "Notify post author"
267
+ msgstr "Notificeer bericht schrijver"
268
+
269
+ #: modules/settings-page/views/settings.php:26
270
  msgid ""
271
  "Send e-mail to an author (and/or others) of a comment/trackback/pingback on "
272
  "a post."
274
  "Verstuur een e-mail naar de auteur (en/of anderen) van een comment/trackback/"
275
  "pingback op een bericht."
276
 
277
+ #: modules/settings-page/views/settings.php:27
278
+ msgid "Notify moderator"
279
+ msgstr "Notificeer moderator"
280
+
281
+ #: modules/settings-page/views/settings.php:27
282
  msgid ""
283
  "Send e-mail to the moderator of the blog about a new comment that is "
284
  "awaiting approval."
286
  "Verstuur een e-mail naar de moderator van het blog over een nieuwe comment "
287
  "welke op een goedkeuring wacht."
288
 
289
+ #: modules/settings-page/views/settings.php:28
290
+ msgid "Password change notification to user"
291
+ msgstr "Wijziging wachtwoord notificatie aan gebruiker"
 
 
292
 
293
+ #: modules/settings-page/views/settings.php:28
294
  msgid ""
295
  "Send e-mail to registered user about changing his or her password. Be "
296
  "careful with this option, because when unchecked, the forgotten password "
301
  "aangevinkt, de vergeten wachtwoord e-mails aanvragen ook worden geblokkeerd "
302
  "en dus niet verzonden."
303
 
304
+ #: modules/settings-page/views/settings.php:29
305
+ msgid "E-mail address change notification to user"
306
+ msgstr "E-mailadres wijziging notificatie aan gebruiker"
307
+
308
+ #: modules/settings-page/views/settings.php:29
309
  msgid ""
310
  "Send e-mail to registered user about changing his or her E-mail address."
311
  msgstr ""
312
  "Verstuur een e-mail naar een geregistreerde gebruiker over het aanpassen van "
313
  "zijn of haar e-mailadres."
314
 
315
+ #: modules/settings-page/views/settings.php:30
316
+ msgid "Password forgotten e-mail to user"
317
+ msgstr "Wachtwoord vergeten e-mail aan gebruiker"
318
+
319
+ #: modules/settings-page/views/settings.php:30
320
  msgid ""
321
  "Send the forgotten password e-mail to registered user.<br/>(To prevent "
322
  "locking yourself out, sending of the forgotten password e-mail for "
324
  msgstr ""
325
  "Verstuur het vergeten wachtwoord e-mail naar de geregistreerde gebruiker."
326
 
327
+ #: modules/settings-page/views/settings.php:34
328
+ msgid "Options for e-mails to administrators"
329
+ msgstr "Opties voor e-mails aan administrators"
330
+
331
+ #: modules/settings-page/views/settings.php:38
332
+ msgid "New user notification to admin"
333
+ msgstr "Nieuwe gebruiker notificatie aan sitebeheerder"
334
+
335
+ #: modules/settings-page/views/settings.php:38
336
+ msgid "Sends an e-mail to the site admin after a new user is registered."
337
+ msgstr ""
338
+ "Verstuur een e-mail naar de sitebeheerder zodra er een nieuwe gebruiker is "
339
+ "geregistreerd."
340
+
341
+ #: modules/settings-page/views/settings.php:39
342
+ msgid "Password change notification to admin"
343
+ msgstr "Wijziging wachtwoord notificatie aan sitebeheerder"
344
+
345
+ #: modules/settings-page/views/settings.php:39
346
+ msgid "Send e-mail to the blog admin of a user changing his or her password."
347
+ msgstr ""
348
+ "Verstuur een e-mail naar de sitebeheerder van een gebruiker welke zijn "
349
+ "wachtwoord heeft aangepast."
350
+
351
+ #: modules/settings-page/views/settings.php:41
352
+ #| msgid "Automatic WordPress core update e-mail"
353
+ msgid "automatic WordPress core update e-mail"
354
+ msgstr "automatische WordPress core update e-mail"
355
+
356
+ #: modules/settings-page/views/settings.php:41
357
+ msgid ""
358
+ "Sends an e-mail after a successful automatic WordPress core update to "
359
+ "administrators. E-mails about failed updates will always be sent to the "
360
+ "administrators and cannot be disabled."
361
+ msgstr ""
362
+ "Verstuurd een e-mail na een succesvolle automatische core update aan "
363
+ "administratoren. e-mails over mislukte updates worden altijd verstuurd aan "
364
+ "administratoren."
365
+
366
+ #: modules/settings-page/views/settings.php:42
367
+ msgid "Automatic WordPress plugin update e-mail"
368
+ msgstr "Automatische WordPress plugin update e-mail"
369
+
370
+ #: modules/settings-page/views/settings.php:42
371
+ msgid ""
372
+ "Sends an e-mail after a successful automatic plugin update to "
373
+ "administrators. E-mails about failed plugin updates will always be sent to "
374
+ "the administrators"
375
+ msgstr ""
376
+ "Verstuurd een e-mail na een succesvolle automatische plugin update aan "
377
+ "administratoren. e-mails over mislukte plugin updates worden altijd "
378
+ "verstuurd aan administratoren"
379
+
380
+ #: modules/settings-page/views/settings.php:43
381
+ msgid "Automatic WordPress theme update e-mail"
382
+ msgstr "Automatische WordPress thema update e-mail"
383
+
384
+ #: modules/settings-page/views/settings.php:43
385
+ msgid ""
386
+ "Sends an e-mail after a successful automatic theme update to administrators. "
387
+ "E-mails about failed theme updates will always be sent to the administrators"
388
+ msgstr ""
389
+ "Verstuurd een e-mail na een succesvolle automatische thema update aan "
390
+ "administratoren. e-mails over mislukte thema updates worden altijd verstuurd "
391
+ "aan administratoren"
392
+
393
+ #: modules/settings-page/views/settings.php:50
394
+ msgid "Password forgotten e-mail to administrator"
395
+ msgstr "Wachtwoord vergeten e-mail aan sitebeheerder"
396
+
397
+ #: modules/settings-page/views/settings.php:50
398
+ msgid "Send the forgotten password e-mail to administrators."
399
+ msgstr "Verstuur vergeten wachtwoord e-mail aan administratoren."
400
+
401
+ #: modules/settings-page/views/settings.php:50
402
  msgid ""
403
+ "Okay, this is a <strong style=\"color:#900\">DANGEROUS OPTION !</strong><br/"
404
+ "> So be warned, because unchecking this option prevents sending out the "
405
+ "forgotten password e-mail to all administrators. So hold on to your own "
406
+ "password and uncheck this one at your own risk ;-)"
 
407
  msgstr ""
408
+ "Okay, dit is een <strong style=\"color:#900\">GEVAARLIJKE OPTIE !</"
409
+ "strong><br/> Wees gewaarschuwd, omdat het uitzetten van deze optie het "
410
+ "verzenden van de vergeten wachtwoord e-mail aan adminstratoren blokeerd. Dus "
411
+ "zorg dat je jouw wachtwoord goed bewaard en zet deze optie uit op eigen "
412
+ "verantwoording ;-)"
413
+
414
+ #: modules/settings-page/views/settings.php:54
415
+ msgid "Reset settings"
416
+ msgstr "Reset instellingen"
417
+
418
+ #: modules/user-email-changed.php:53
419
+ msgid "E-mail address changed by user"
420
+ msgstr "E-mailadres is gewijzigd door gebruiker"
421
+
422
+ #: modules/user-email-changed.php:54
423
+ msgid "Request to change e-mailadress notification to admin"
424
+ msgstr "Verzoek om e-mailadress aan te passen notificatie aan admin"
425
+
426
+ #: modules/user-email-changed.php:54
427
+ msgid ""
428
+ "Sends an e-mail to administrators after a user requested to update his or "
429
+ "her e-mailaddress."
430
+ msgstr ""
431
+ "Verstuurd een e-mail aan administratoren nadat een gebruiker een aanvraag "
432
+ "heeft gedaan om zijn e-mailadres aan te passen."
433
+
434
+ #: modules/user-email-changed.php:55
435
+ msgid "User changed (confirmed) e-mail notification to admin"
436
+ msgstr "Gebruiker heeft e-mail veranderd notificatie naar de administrator"
437
+
438
+ #: modules/user-email-changed.php:55
439
+ msgid ""
440
+ "Sends an e-mail to administrators after a user successfully updated his or "
441
+ "her e-mailaddress."
442
+ msgstr ""
443
+ "Verstuurd een e-mail aan administratoren nadat een gebruiker zijn e-"
444
+ "mailadres succesvol heeft aangepast."
445
+
446
+ #: modules/user-email-changed.php:79
447
+ msgid ""
448
+ "Howdy admin,\n"
449
+ " \n"
450
+ " Recently a user requested to have his email address on his account "
451
+ "changed.\n"
452
+ "\n"
453
+ " An email change request has been sent to ###EMAIL###\n"
454
+ " \n"
455
+ " Regards,\n"
456
+ " All at ###SITENAME###\n"
457
+ " ###SITEURL###"
458
+ msgstr ""
459
+ "Howdy admin,\n"
460
+ " \n"
461
+ " Recentelijk heeft een gebruiker een verzoek verstuurd om zijn e-mail "
462
+ "aan te passen.\n"
463
+ "\n"
464
+ " Een e-mail aanpassings verzoek is verstuur naar ###EMAIL###\n"
465
+ " \n"
466
+ " Gegroet,\n"
467
+ " ###SITENAME###\n"
468
+ " ###SITEURL###"
469
+
470
+ #: modules/user-email-changed.php:94
471
+ #, php-format
472
+ msgid "[%s] User requested Email Change"
473
+ msgstr "[%s] Gebruiker heeft een e-mail aanpassing verzocht"
474
+
475
+ #: modules/user-email-changed.php:115
476
+ msgid ""
477
+ "Hi admin,\n"
478
+ "\n"
479
+ " This notice confirms that the user ###USERNAME### changed his email "
480
+ "address on ###SITENAME### from ###EMAIL### to ###NEW_EMAIL###.\n"
481
+ "\n"
482
+ " Regards,\n"
483
+ " All at ###SITENAME###\n"
484
+ " ###SITEURL###"
485
+ msgstr ""
486
+ "Hi admin,\n"
487
+ "\n"
488
+ " Deze melding bevestigt dat de gebruiker ###USERNAME### zijn e-mailadres "
489
+ "heeft gewijzigd voor ###SITENAME### van ###EMAIL### naar ###NEW_EMAIL###.\n"
490
+ "\n"
491
+ " Gegroet,\n"
492
+ " ###SITENAME###\n"
493
+ " ###SITEURL###"
494
+
495
+ #: modules/user-email-changed.php:130
496
+ #, php-format
497
+ msgid "[%s] User Email Changed"
498
+ msgstr "[%s] Gebruikers e-mailadress gewijzigd"
languages/manage-notification-emails.pot CHANGED
@@ -1,112 +1,432 @@
 
 
1
  #, fuzzy
2
  msgid ""
3
  msgstr ""
4
- "Project-Id-Version: Famne\n"
5
- "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: \n"
7
- "PO-Revision-Date: 2018-10-19 21:04:29+0000\n"
8
- "Last-Translator: none\n"
9
- "Language-Team: \n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
- "X-Poedit-SourceCharset: utf-8\n"
15
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
16
  "X-Poedit-Basepath: ..\n"
17
- "X-Textdomain-Support: yes\n"
18
- "Language: en_US\n"
19
- "X-Generator: Poedit 2.2\n"
 
 
 
 
 
 
 
20
  "X-Poedit-SearchPath-0: .\n"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
- #: includes/class.FAMNESettingsPage.php:62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  msgid "Manage the notification e-mails"
24
  msgstr ""
25
 
26
- #: includes/class.FAMNESettingsPage.php:73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  msgid "If you find this plugin useful, you can show your appreciation here :-)"
28
  msgstr ""
29
 
30
- #: includes/class.FAMNESettingsPage.php:106
31
- msgid "New user notification to admin"
32
  msgstr ""
33
 
34
- #: includes/class.FAMNESettingsPage.php:114
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  msgid "New user notification to user"
36
  msgstr ""
37
 
38
- #: includes/class.FAMNESettingsPage.php:122
 
 
 
 
39
  msgid "Notify post author"
40
  msgstr ""
41
 
42
- #: includes/class.FAMNESettingsPage.php:130
 
 
 
 
 
 
43
  msgid "Notify moderator"
44
  msgstr ""
45
 
46
- #: includes/class.FAMNESettingsPage.php:138
47
- msgid "Password change notification to admin"
 
 
48
  msgstr ""
49
 
50
- #: includes/class.FAMNESettingsPage.php:146
51
  msgid "Password change notification to user"
52
  msgstr ""
53
 
54
- #: includes/class.FAMNESettingsPage.php:154
 
 
 
 
 
 
 
55
  msgid "E-mail address change notification to user"
56
  msgstr ""
57
 
58
- #: includes/class.FAMNESettingsPage.php:162
 
 
 
 
 
59
  msgid "Password forgotten e-mail to user"
60
  msgstr ""
61
 
62
- #: includes/class.FAMNESettingsPage.php:170
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  msgid "Password forgotten e-mail to administrator"
64
  msgstr ""
65
 
66
- #: includes/class.FAMNESettingsPage.php:199
67
- msgid "Manage your notification e-mail preferences below."
68
  msgstr ""
69
 
70
- #: includes/class.FAMNESettingsPage.php:201
71
- msgid "By unchecking the checkbox you prevent sending the specific e-mails."
 
 
 
 
72
  msgstr ""
73
 
74
- #: includes/class.FAMNESettingsPage.php:213
75
- msgid "Enable sending e-mail"
76
  msgstr ""
77
 
78
- #: includes/class.FAMNESettingsPage.php:220
79
- msgid "Sends an e-mail to the site admin after a new user is registered."
80
  msgstr ""
81
 
82
- #: includes/class.FAMNESettingsPage.php:225
83
- msgid "Send e-mail with login credentials to a newly-registered user."
84
  msgstr ""
85
 
86
- #: includes/class.FAMNESettingsPage.php:230
87
- msgid "Send e-mail to an author (and/or others) of a comment/trackback/pingback on a post."
 
 
88
  msgstr ""
89
 
90
- #: includes/class.FAMNESettingsPage.php:235
91
- msgid "Send e-mail to the moderator of the blog about a new comment that is awaiting approval."
92
  msgstr ""
93
 
94
- #: includes/class.FAMNESettingsPage.php:240
95
- msgid "Send e-mail to the blog admin of a user changing his or her password."
 
 
96
  msgstr ""
97
 
98
- #: includes/class.FAMNESettingsPage.php:245
99
- msgid "Send e-mail to registered user about changing his or her password. Be careful with this option, because when unchecked, the forgotten password request e-mails will be blocked too."
 
 
 
 
 
 
 
 
 
 
100
  msgstr ""
101
 
102
- #: includes/class.FAMNESettingsPage.php:250
103
- msgid "Send e-mail to registered user about changing his or her E-mail address."
 
104
  msgstr ""
105
 
106
- #: includes/class.FAMNESettingsPage.php:255
107
- msgid "Send the forgotten password e-mail to registered user.<br/>(To prevent locking yourself out, sending of the forgotten password e-mail for administrators will still work)"
 
 
 
 
 
 
 
 
108
  msgstr ""
109
 
110
- #: includes/class.FAMNESettingsPage.php:259
111
- msgid "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 ;-)"
112
- msgstr ""
 
1
+ # Copyright (C) 2021 Manage Notification E-mails
2
+ # This file is distributed under the same license as the Manage Notification E-mails package.
3
  #, fuzzy
4
  msgid ""
5
  msgstr ""
6
+ "Project-Id-Version: Manage Notification E-mails\n"
 
 
 
 
 
7
  "MIME-Version: 1.0\n"
8
  "Content-Type: text/plain; charset=UTF-8\n"
9
  "Content-Transfer-Encoding: 8bit\n"
 
 
 
10
  "X-Poedit-Basepath: ..\n"
11
+ "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;"
12
+ "_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;"
13
+ "esc_html_e;esc_html_x:1,2c\n"
14
+ "X-Poedit-SourceCharset: UTF-8\n"
15
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
16
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
17
+ "POT-Creation-Date: 2021-05-24 21:56+0200\n"
18
+ "X-Generator: Poedit 2.4.2\n"
19
+ "Last-Translator: \n"
20
+ "Language-Team: \n"
21
  "X-Poedit-SearchPath-0: .\n"
22
+ "X-Poedit-SearchPathExcluded-0: *.js\n"
23
+
24
+ #: core/functions.setup.php:27
25
+ msgid "Donate"
26
+ msgstr ""
27
+
28
+ #: modules/custom-recipients.php:47
29
+ msgid "Extra admin recipients"
30
+ msgstr ""
31
+
32
+ #: modules/custom-recipients.php:48
33
+ msgid ""
34
+ "Here you can add extra admin recipients who will also receive all admin "
35
+ "notifications."
36
+ msgstr ""
37
+
38
+ #: modules/custom-recipients.php:49
39
+ msgid "E-mail address(es)"
40
+ msgstr ""
41
+
42
+ #: modules/export-settings.php:52
43
+ msgid "Export and import settings"
44
+ msgstr ""
45
+
46
+ #: modules/export-settings.php:53
47
+ msgid ""
48
+ "Here you can export or import your Manage notification e-mails settings."
49
+ msgstr ""
50
+
51
+ #: modules/export-settings.php:57
52
+ msgid "Do you want to overwrite your current settings?"
53
+ msgstr ""
54
+
55
+ #: modules/export-settings.php:58
56
+ msgid "Start import"
57
+ msgstr ""
58
+
59
+ #: modules/export-settings.php:97
60
+ msgid "Error uploading file. Please try again."
61
+ msgstr ""
62
+
63
+ #: modules/export-settings.php:102
64
+ msgid "Incorrect file type."
65
+ msgstr ""
66
+
67
+ #: modules/export-settings.php:108
68
+ msgid "File size exceeds maximum upload limit."
69
+ msgstr ""
70
+
71
+ #: modules/export-settings.php:120
72
+ msgid "Import file empty."
73
+ msgstr ""
74
+
75
+ #: modules/export-settings.php:128
76
+ msgid "The import file has a different plugin version."
77
+ msgstr ""
78
+
79
+ #: modules/pluggable/pluggable-functions-1.2.php:30
80
+ #: modules/pluggable/pluggable-functions-1.3.php:34
81
+ #: modules/pluggable/pluggable-functions-1.5.php:44
82
+ #, php-format
83
+ msgid "Password Lost and Changed for user: %s"
84
+ msgstr ""
85
+
86
+ #: modules/pluggable/pluggable-functions-1.2.php:34
87
+ #: modules/pluggable/pluggable-functions-1.3.php:38
88
+ #: modules/pluggable/pluggable-functions-1.5.php:48
89
+ #, php-format
90
+ msgid "[%s] Password Lost/Changed"
91
+ msgstr ""
92
+
93
+ #: modules/pluggable/pluggable-functions-1.2.php:162
94
+ #: modules/pluggable/pluggable-functions-1.3.php:185
95
+ #: modules/pluggable/pluggable-functions-1.5.php:200
96
+ #, php-format
97
+ msgid "New user registration on your site %s:"
98
+ msgstr ""
99
+
100
+ #: modules/pluggable/pluggable-functions-1.2.php:163
101
+ #: modules/pluggable/pluggable-functions-1.2.php:195
102
+ #: modules/pluggable/pluggable-functions-1.3.php:186
103
+ #: modules/pluggable/pluggable-functions-1.3.php:232
104
+ #: modules/pluggable/pluggable-functions-1.5.php:202
105
+ #: modules/pluggable/pluggable-functions-1.5.php:286
106
+ #, php-format
107
+ msgid "Username: %s"
108
+ msgstr ""
109
 
110
+ #: modules/pluggable/pluggable-functions-1.2.php:164
111
+ #, php-format
112
+ msgid "E-mail: %s"
113
+ msgstr ""
114
+
115
+ #: modules/pluggable/pluggable-functions-1.2.php:167
116
+ #: modules/pluggable/pluggable-functions-1.3.php:189
117
+ #: modules/pluggable/pluggable-functions-1.5.php:209
118
+ #, php-format
119
+ msgid "[%s] New User Registration"
120
+ msgstr ""
121
+
122
+ #: modules/pluggable/pluggable-functions-1.2.php:196
123
+ #: modules/pluggable/pluggable-functions-1.3.php:233
124
+ #: modules/pluggable/pluggable-functions-1.5.php:287
125
+ msgid "To set your password, visit the following address:"
126
+ msgstr ""
127
+
128
+ #: modules/pluggable/pluggable-functions-1.2.php:201
129
+ #: modules/pluggable/pluggable-functions-1.3.php:238
130
+ #, php-format
131
+ msgid "[%s] Your username and password info"
132
+ msgstr ""
133
+
134
+ #: modules/pluggable/pluggable-functions-1.3.php:187
135
+ #: modules/pluggable/pluggable-functions-1.5.php:204
136
+ #, php-format
137
+ msgid "Email: %s"
138
+ msgstr ""
139
+
140
+ #: modules/pluggable/pluggable-functions-1.5.php:295
141
+ #, php-format
142
+ msgid "[%s] Login Details"
143
+ msgstr ""
144
+
145
+ #: modules/settings-page/class.FAMNESettingsPage.php:100
146
+ msgid "Network options"
147
+ msgstr ""
148
+
149
+ #: modules/settings-page/class.FAMNESettingsPage.php:110
150
+ msgid "Core options"
151
+ msgstr ""
152
+
153
+ #: modules/settings-page/class.FAMNESettingsPage.php:116
154
+ msgid "Modules"
155
+ msgstr ""
156
+
157
+ #: modules/settings-page/class.FAMNESettingsPage.php:122
158
+ #: modules/settings-page/views/extra.php:23
159
+ msgid "Information"
160
+ msgstr ""
161
+
162
+ #: modules/settings-page/class.FAMNESettingsPage.php:368
163
+ msgid "Settings"
164
+ msgstr ""
165
+
166
+ #: modules/settings-page/views/container-network.php:21
167
+ #: modules/settings-page/views/container.php:23
168
  msgid "Manage the notification e-mails"
169
  msgstr ""
170
 
171
+ #: modules/settings-page/views/container-network.php:21
172
+ #: modules/settings-page/views/container.php:23
173
+ msgid "version"
174
+ msgstr ""
175
+
176
+ #: modules/settings-page/views/container-network.php:26
177
+ #: modules/settings-page/views/container.php:37
178
+ msgid "Manage your notification e-mail preferences below."
179
+ msgstr ""
180
+
181
+ #: modules/settings-page/views/container.php:30
182
+ msgid "Site managed by network manager"
183
+ msgstr ""
184
+
185
+ #: modules/settings-page/views/container.php:31
186
+ msgid ""
187
+ "Manage notification e-mails settings for this site are globally managed in "
188
+ "the multisite network settings menu."
189
+ msgstr ""
190
+
191
+ #: modules/settings-page/views/donatebox.php:18
192
  msgid "If you find this plugin useful, you can show your appreciation here :-)"
193
  msgstr ""
194
 
195
+ #: modules/settings-page/views/extra.php:25
196
+ msgid "Available Manage Notification E-mail Modules"
197
  msgstr ""
198
 
199
+ #: modules/settings-page/views/modules.php:24
200
+ msgid "Extra modules"
201
+ msgstr ""
202
+
203
+ #: modules/settings-page/views/modules.php:25
204
+ msgid ""
205
+ "The modules below are options which are not available in WordPress by "
206
+ "default."
207
+ msgstr ""
208
+
209
+ #: modules/settings-page/views/modules.php:39
210
+ msgid "Multisite managed settings available"
211
+ msgstr ""
212
+
213
+ #: modules/settings-page/views/modules.php:40
214
+ msgid ""
215
+ "For this environment, it is possible for you to manage all settings globally "
216
+ "in the network settings menu."
217
+ msgstr ""
218
+
219
+ #: modules/settings-page/views/network.php:29
220
+ msgid "Manage multisite options"
221
+ msgstr ""
222
+
223
+ #: modules/settings-page/views/network.php:30
224
+ msgid ""
225
+ "Here you can choose to manage all options for this plugin in one location. "
226
+ "No hassle with toggling options on and off for each subsite individually."
227
+ msgstr ""
228
+
229
+ #: modules/settings-page/views/network.php:33
230
+ msgid "Use the network settings."
231
+ msgstr ""
232
+
233
+ #: modules/settings-page/views/network.php:33
234
+ msgid ""
235
+ "Checking this option will disable per site management. All sites will use "
236
+ "these global network settings."
237
+ msgstr ""
238
+
239
+ #: modules/settings-page/views/settings.php:22
240
+ msgid "Options for e-mails to users"
241
+ msgstr ""
242
+
243
+ #: modules/settings-page/views/settings.php:25
244
  msgid "New user notification to user"
245
  msgstr ""
246
 
247
+ #: modules/settings-page/views/settings.php:25
248
+ msgid "Send e-mail with login credentials to a newly-registered user."
249
+ msgstr ""
250
+
251
+ #: modules/settings-page/views/settings.php:26
252
  msgid "Notify post author"
253
  msgstr ""
254
 
255
+ #: modules/settings-page/views/settings.php:26
256
+ msgid ""
257
+ "Send e-mail to an author (and/or others) of a comment/trackback/pingback on "
258
+ "a post."
259
+ msgstr ""
260
+
261
+ #: modules/settings-page/views/settings.php:27
262
  msgid "Notify moderator"
263
  msgstr ""
264
 
265
+ #: modules/settings-page/views/settings.php:27
266
+ msgid ""
267
+ "Send e-mail to the moderator of the blog about a new comment that is "
268
+ "awaiting approval."
269
  msgstr ""
270
 
271
+ #: modules/settings-page/views/settings.php:28
272
  msgid "Password change notification to user"
273
  msgstr ""
274
 
275
+ #: modules/settings-page/views/settings.php:28
276
+ msgid ""
277
+ "Send e-mail to registered user about changing his or her password. Be "
278
+ "careful with this option, because when unchecked, the forgotten password "
279
+ "request e-mails will be blocked too."
280
+ msgstr ""
281
+
282
+ #: modules/settings-page/views/settings.php:29
283
  msgid "E-mail address change notification to user"
284
  msgstr ""
285
 
286
+ #: modules/settings-page/views/settings.php:29
287
+ msgid ""
288
+ "Send e-mail to registered user about changing his or her E-mail address."
289
+ msgstr ""
290
+
291
+ #: modules/settings-page/views/settings.php:30
292
  msgid "Password forgotten e-mail to user"
293
  msgstr ""
294
 
295
+ #: modules/settings-page/views/settings.php:30
296
+ msgid ""
297
+ "Send the forgotten password e-mail to registered user.<br/>(To prevent "
298
+ "locking yourself out, sending of the forgotten password e-mail for "
299
+ "administrators will still work)"
300
+ msgstr ""
301
+
302
+ #: modules/settings-page/views/settings.php:34
303
+ msgid "Options for e-mails to administrators"
304
+ msgstr ""
305
+
306
+ #: modules/settings-page/views/settings.php:38
307
+ msgid "New user notification to admin"
308
+ msgstr ""
309
+
310
+ #: modules/settings-page/views/settings.php:38
311
+ msgid "Sends an e-mail to the site admin after a new user is registered."
312
+ msgstr ""
313
+
314
+ #: modules/settings-page/views/settings.php:39
315
+ msgid "Password change notification to admin"
316
+ msgstr ""
317
+
318
+ #: modules/settings-page/views/settings.php:39
319
+ msgid "Send e-mail to the blog admin of a user changing his or her password."
320
+ msgstr ""
321
+
322
+ #: modules/settings-page/views/settings.php:41
323
+ msgid "automatic WordPress core update e-mail"
324
+ msgstr ""
325
+
326
+ #: modules/settings-page/views/settings.php:41
327
+ msgid ""
328
+ "Sends an e-mail after a successful automatic WordPress core update to "
329
+ "administrators. E-mails about failed updates will always be sent to the "
330
+ "administrators and cannot be disabled."
331
+ msgstr ""
332
+
333
+ #: modules/settings-page/views/settings.php:42
334
+ msgid "Automatic WordPress plugin update e-mail"
335
+ msgstr ""
336
+
337
+ #: modules/settings-page/views/settings.php:42
338
+ msgid ""
339
+ "Sends an e-mail after a successful automatic plugin update to "
340
+ "administrators. E-mails about failed plugin updates will always be sent to "
341
+ "the administrators"
342
+ msgstr ""
343
+
344
+ #: modules/settings-page/views/settings.php:43
345
+ msgid "Automatic WordPress theme update e-mail"
346
+ msgstr ""
347
+
348
+ #: modules/settings-page/views/settings.php:43
349
+ msgid ""
350
+ "Sends an e-mail after a successful automatic theme update to administrators. "
351
+ "E-mails about failed theme updates will always be sent to the administrators"
352
+ msgstr ""
353
+
354
+ #: modules/settings-page/views/settings.php:50
355
  msgid "Password forgotten e-mail to administrator"
356
  msgstr ""
357
 
358
+ #: modules/settings-page/views/settings.php:50
359
+ msgid "Send the forgotten password e-mail to administrators."
360
  msgstr ""
361
 
362
+ #: modules/settings-page/views/settings.php:50
363
+ msgid ""
364
+ "Okay, this is a <strong style=\"color:#900\">DANGEROUS OPTION !</strong><br/"
365
+ "> So be warned, because unchecking this option prevents sending out the "
366
+ "forgotten password e-mail to all administrators. So hold on to your own "
367
+ "password and uncheck this one at your own risk ;-)"
368
  msgstr ""
369
 
370
+ #: modules/settings-page/views/settings.php:54
371
+ msgid "Reset settings"
372
  msgstr ""
373
 
374
+ #: modules/user-email-changed.php:53
375
+ msgid "E-mail address changed by user"
376
  msgstr ""
377
 
378
+ #: modules/user-email-changed.php:54
379
+ msgid "Request to change e-mailadress notification to admin"
380
  msgstr ""
381
 
382
+ #: modules/user-email-changed.php:54
383
+ msgid ""
384
+ "Sends an e-mail to administrators after a user requested to update his or "
385
+ "her e-mailaddress."
386
  msgstr ""
387
 
388
+ #: modules/user-email-changed.php:55
389
+ msgid "User changed (confirmed) e-mail notification to admin"
390
  msgstr ""
391
 
392
+ #: modules/user-email-changed.php:55
393
+ msgid ""
394
+ "Sends an e-mail to administrators after a user successfully updated his or "
395
+ "her e-mailaddress."
396
  msgstr ""
397
 
398
+ #: modules/user-email-changed.php:79
399
+ msgid ""
400
+ "Howdy admin,\n"
401
+ " \n"
402
+ " Recently a user requested to have his email address on his account "
403
+ "changed.\n"
404
+ "\n"
405
+ " An email change request has been sent to ###EMAIL###\n"
406
+ " \n"
407
+ " Regards,\n"
408
+ " All at ###SITENAME###\n"
409
+ " ###SITEURL###"
410
  msgstr ""
411
 
412
+ #: modules/user-email-changed.php:94
413
+ #, php-format
414
+ msgid "[%s] User requested Email Change"
415
  msgstr ""
416
 
417
+ #: modules/user-email-changed.php:115
418
+ msgid ""
419
+ "Hi admin,\n"
420
+ "\n"
421
+ " This notice confirms that the user ###USERNAME### changed his email "
422
+ "address on ###SITENAME### from ###EMAIL### to ###NEW_EMAIL###.\n"
423
+ "\n"
424
+ " Regards,\n"
425
+ " All at ###SITENAME###\n"
426
+ " ###SITEURL###"
427
  msgstr ""
428
 
429
+ #: modules/user-email-changed.php:130
430
+ #, php-format
431
+ msgid "[%s] User Email Changed"
432
+ msgstr ""
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.6.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.6.1
7
  Author: Virgial Berveling
8
  Author URI: https://www.freeamigos.nl
9
  Text Domain: manage-notification-emails
@@ -11,57 +11,61 @@ Domain Path: /languages/
11
  License: GPLv2
12
  */
13
 
14
-
15
  /*
16
- Copyright (c) 2006-2015 Virgial Berveling
17
 
18
- This program is free software; you can redistribute it and/or modify
19
- it under the terms of the GNU General Public License, version 2, as
20
- published by the Free Software Foundation.
21
 
22
- This program is distributed in the hope that it will be useful,
23
- but WITHOUT ANY WARRANTY; without even the implied warranty of
24
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
- GNU General Public License for more details.
26
 
27
- You should have received a copy of the GNU General Public License
28
- along with this program; if not, write to the Free Software
29
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30
 
31
- You may also view the license here:
32
- http://www.gnu.org/licenses/gpl.html
33
  */
34
 
35
 
36
  /*
37
- A NOTE ABOUT LICENSE:
38
-
39
- While this plugin is freely available and open-source under the GPL2
40
- license, that does not mean it is "public domain." You are free to modify
41
- and redistribute as long as you comply with the license. Any derivative
42
- work MUST be GPL licensed and available as open source. You also MUST give
43
- proper attribution to the original author, copyright holder, and trademark
44
- owner. This means you cannot change two lines of code and claim copyright
45
- of the entire work as your own. The GPL2 license requires that if you
46
- modify this code, you must clearly indicate what section(s) you have
47
- modified and you may only claim copyright of your modifications and not
48
- the body of work. If you are unsure or have questions about how a
49
- derivative work you are developing complies with the license, copyright,
50
- trademark, or if you do not understand the difference between
51
- open source and public domain, contact the original author at:
52
- http://www.freeamigos.mx/contact/.
53
-
54
-
55
- INSTALLATION PROCEDURE:
56
-
57
- Just put it in your plugins directory.
58
  */
59
 
60
- if (!defined('ABSPATH')) die();
 
 
61
 
62
- define( 'FA_MNE_VERSION', '1.6.1' );
63
  define( 'FA_MNE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
64
  define( 'FA_MNE_PLUGIN_DIR', untrailingslashit( dirname( __FILE__ ) ) );
 
 
 
65
 
66
 
67
  /**
@@ -70,30 +74,22 @@ define( 'FA_MNE_PLUGIN_DIR', untrailingslashit( dirname( __FILE__ ) ) );
70
  * @since 1.0.0
71
  */
72
 
73
- include_once( FA_MNE_PLUGIN_DIR . '/includes/class.FAMNE.php' );
 
 
 
 
 
 
74
 
75
  function fa_mne_init() {
76
- add_action( 'plugins_loaded', 'FAMNE::update_check');
77
-
78
- if (is_admin()) :
79
- include_once( FA_MNE_PLUGIN_DIR . '/includes/class.FAMNESettingsPage.php' );
80
- new FAMNESettingsPage();
81
- endif;
82
  }
83
 
84
- /**
85
- * Version switch.
86
- *
87
- * @since 1.3.0
88
- */
89
- global $wp_version;
90
- if (version_compare($wp_version, '5.2.0') >= 0) {
91
- include_once( FA_MNE_PLUGIN_DIR . '/includes/pluggable-functions-1.5.php' );
92
- }elseif (version_compare($wp_version, '4.7.0') >= 0) {
93
- include_once( FA_MNE_PLUGIN_DIR . '/includes/pluggable-functions-1.3.php' );
94
- }else {
95
- include_once( FA_MNE_PLUGIN_DIR . '/includes/pluggable-functions-1.2.php' );
96
  }
 
97
 
98
  fa_mne_init();
99
-
1
  <?php
2
  /*
3
  Plugin Name: Manage Notification E-mails
4
+ Plugin URI: https://www.freeamigos.nl/wp-plugins/manage-notification-emails/1.8.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.8.0
7
  Author: Virgial Berveling
8
  Author URI: https://www.freeamigos.nl
9
  Text Domain: manage-notification-emails
11
  License: GPLv2
12
  */
13
 
 
14
  /*
15
+ Copyright (c) 2006-2015 Virgial Berveling
16
 
17
+ This program is free software; you can redistribute it and/or modify
18
+ it under the terms of the GNU General Public License, version 2, as
19
+ published by the Free Software Foundation.
20
 
21
+ This program is distributed in the hope that it will be useful,
22
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
23
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
+ GNU General Public License for more details.
25
 
26
+ You should have received a copy of the GNU General Public License
27
+ along with this program; if not, write to the Free Software
28
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29
 
30
+ You may also view the license here:
31
+ http://www.gnu.org/licenses/gpl.html
32
  */
33
 
34
 
35
  /*
36
+ A NOTE ABOUT LICENSE:
37
+
38
+ While this plugin is freely available and open-source under the GPL2
39
+ license, that does not mean it is "public domain." You are free to modify
40
+ and redistribute as long as you comply with the license. Any derivative
41
+ work MUST be GPL licensed and available as open source. You also MUST give
42
+ proper attribution to the original author, copyright holder, and trademark
43
+ owner. This means you cannot change two lines of code and claim copyright
44
+ of the entire work as your own. The GPL2 license requires that if you
45
+ modify this code, you must clearly indicate what section(s) you have
46
+ modified and you may only claim copyright of your modifications and not
47
+ the body of work. If you are unsure or have questions about how a
48
+ derivative work you are developing complies with the license, copyright,
49
+ trademark, or if you do not understand the difference between
50
+ open source and public domain, contact the original author at:
51
+ https://www.freeamigos.nl/contact/.
52
+
53
+
54
+ INSTALLATION PROCEDURE:
55
+
56
+ Just put it in your plugins directory.
57
  */
58
 
59
+ if ( ! defined( 'ABSPATH' ) ) {
60
+ die();
61
+ }
62
 
63
+ define( 'FA_MNE_VERSION', '1.8.0' );
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' );
67
+
68
+
69
 
70
 
71
  /**
74
  * @since 1.0.0
75
  */
76
 
77
+ require_once FA_MNE_PLUGIN_DIR . '/core/class.FAMNE.php';
78
+ require_once FA_MNE_PLUGIN_DIR . '/core/functions.setup.php';
79
+ require_once FA_MNE_PLUGIN_DIR . '/modules/settings-page/settings-page.php';
80
+ require_once FA_MNE_PLUGIN_DIR . '/modules/pluggable/pluggable.php';
81
+ require_once FA_MNE_PLUGIN_DIR . '/modules/user-email-changed.php';
82
+ require_once FA_MNE_PLUGIN_DIR . '/modules/custom-recipients.php';
83
+ require_once FA_MNE_PLUGIN_DIR . '/modules/export-settings.php';
84
 
85
  function fa_mne_init() {
86
+ new FAMNE();
87
+ add_action( 'plugins_loaded', 'FAMNE::update_check' );
 
 
 
 
88
  }
89
 
90
+ function fa_mne_uninstall() {
91
+ FAMNE::uninstall();
 
 
 
 
 
 
 
 
 
 
92
  }
93
+ register_uninstall_hook( __FILE__, 'fa_mne_uninstall' );
94
 
95
  fa_mne_init();
 
modules/custom-recipients.php ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Manage notification emails settings page class
4
+ * *
5
+ * This file is part of the Manage Notification Emails plugin
6
+ * You can find out more about this plugin at https://www.freeamigos.nl
7
+ * Copyright (c) 2006-2015 Virgial Berveling
8
+ *
9
+ * @package WordPress
10
+ * @author Virgial Berveling
11
+ * @copyright 2006-2020
12
+ *
13
+ * since: 1.0.0
14
+ */
15
+
16
+ // Exit if accessed directly.
17
+ if ( ! defined( 'ABSPATH' ) ) {
18
+ exit;
19
+ }
20
+
21
+ /**
22
+ * Load module famne_custom_recipients
23
+ *
24
+ * @return array $args
25
+ */
26
+ function load_mod_famne_custom_recipients() {
27
+ FAMNE::AddModule(
28
+ 'custom_admin_recipients',
29
+ array(
30
+ 'name' => 'Choose extra recipients for admin notifications',
31
+ 'version' => '1.0.0',
32
+ 'option_id' => array( 'custom_admin_recipients' ),
33
+ 'card' => 'card_famne_custom_admin_recipients',
34
+ )
35
+ );
36
+
37
+ /**
38
+ * Card_famne_custom_admin_recipients
39
+ *
40
+ * @param mixed $famne_options
41
+ * @return void
42
+ */
43
+ function card_famne_custom_admin_recipients( $famne_options ) {
44
+ ?>
45
+ <div class="card">
46
+ <label class="switch"><div class="slider round <?php echo ( ! empty( $famne_options['custom_admin_recipients'] ) ? 'active' : '' ); ?>"><span class="on">ON</span><span class="off">OFF</span></div></label>
47
+ <h2 class="title"><?php _e( 'Extra admin recipients', 'manage-notification-emails' ); ?></h2>
48
+ <?php _e( 'Here you can add extra admin recipients who will also receive all admin notifications.' ); ?>
49
+ <?php print_textbox( $famne_options, 'custom_admin_recipients', __( 'E-mail address(es)', 'manage-notification-emails' ), '', 'For multiple addresses separate by comma.', 'text', 'email1@domain.com,email2@otherdomain.com' ); ?>
50
+ </div>
51
+ <?php
52
+ }
53
+
54
+ add_filter( 'wp_mail', 'famne_custom_to_admin_mailaddresses' );
55
+
56
+ /**
57
+ * Filter custom admin email emailadresses.
58
+ *
59
+ * @param mixed $args
60
+ * @return array $args
61
+ */
62
+ function famne_custom_to_admin_mailaddresses( $args ) {
63
+
64
+ // If to isn't set (who knows why it wouldn't) return args.
65
+ if ( ! isset( $args['to'] ) || empty( $args['to'] ) ) {
66
+ return $args;
67
+ }
68
+
69
+ // If TO is an array of emails, means it's probably not an admin email.
70
+ if ( is_array( $args['to'] ) ) {
71
+ return $args;
72
+ }
73
+ if ( ! empty( $args['cc'] ) ) {
74
+ return $args;
75
+ }
76
+
77
+ $admin_email = get_option( 'admin_email' );
78
+
79
+ // Check if admin email found in string, as TO could be formatted like 'Administrator <admin@domain.com>',
80
+ // and if we specifically check if it's just the email, we may miss some admin emails.
81
+ if ( strpos( $args['to'], $admin_email ) !== false ) {
82
+ $famne_options = FAMNE::get_option( 'famne_options' );
83
+ if ( empty( $famne_options['custom_admin_recipients'] ) ) {
84
+ return $args;
85
+ }
86
+
87
+ $emails = array();
88
+ if ( strpos( $famne_options['custom_admin_recipients'], ',' ) > 0 ) :
89
+ $emails = explode( ',', $famne_options['custom_admin_recipients'] );
90
+ else :
91
+ $emails = array( $famne_options['custom_admin_recipients'] );
92
+ endif;
93
+
94
+ if ( ! empty( $args['headers'] ) && is_string( $args['headers'] ) ) {
95
+ $args['headers'] = array( $args['headers'] );
96
+ }
97
+ if ( ! empty( $emails ) ) :
98
+ if ( empty( $args['headers'] ) ) {
99
+ $args['headers'] = array();
100
+ }
101
+ foreach ( $emails as $e ) :
102
+ $e = trim( $e );
103
+ if ( is_email( $e ) ) {
104
+ $args['headers'][] = 'Cc: ' . $e;
105
+ }
106
+ endforeach;
107
+ endif;
108
+ }
109
+ return $args;
110
+ }
111
+ }
112
+
113
+ add_action( 'fa_mne_modules', 'load_mod_famne_custom_recipients' );
modules/export-settings.php ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Manage notification emails settings page class
4
+ * *
5
+ * This file is part of the Manage Notification Emails plugin
6
+ * You can find out more about this plugin at https://www.freeamigos.nl
7
+ * Copyright (c) 2006-2015 Virgial Berveling
8
+ *
9
+ * @package WordPress
10
+ * @author Virgial Berveling
11
+ * @copyright 2006-2020
12
+ *
13
+ * since: 1.0.0
14
+ */
15
+
16
+ // Exit if accessed directly.
17
+ if ( ! defined( 'ABSPATH' ) ) {
18
+ exit;
19
+ }
20
+
21
+ /**
22
+ * Load module famne_custom_recipients
23
+ *
24
+ * @return void
25
+ */
26
+ function load_mod_famne_export_settings() {
27
+ FAMNE::AddModule(
28
+ 'export_settings',
29
+ array(
30
+ 'name' => 'Export and import settings',
31
+ 'version' => '1.0.0',
32
+ 'option_id' => array( 'export_settings' ),
33
+ 'card' => 'card_famne_export_settings',
34
+ )
35
+ );
36
+
37
+ /**
38
+ * Card_famne_export_settings
39
+ *
40
+ * @return void
41
+ */
42
+ function card_famne_export_settings() {
43
+ global $pagenow;
44
+ if ( ! FAMNESettingsPage::is_famne_settings_page() && ! FAMNESettingsPage::is_famne_network_settings_page() ) {
45
+ return;
46
+ }
47
+
48
+ $downloadlink = $pagenow . '?' . 'page=' . sanitize_text_field( $_GET['page'] ) . '&export-settings=famne';
49
+
50
+ ?>
51
+ <div class="card">
52
+ <h2 class="title"><?php _e( 'Export and import settings', 'manage-notification-emails' ); ?></h2>
53
+ <?php _e( 'Here you can export or import your Manage notification e-mails settings.' ); ?>
54
+ <br/><br/><strong>Export your settings in JSON format</strong><br/>
55
+ <a href="<?php echo $downloadlink; ?>" class="button" target="_blank" rel="noopener">Export settings file</a>
56
+ <br/><br/><strong>Import setting in JSON format</strong><br/>
57
+ <input type="file" id="settings-upload-file" name="settings-upload-file" accept="application/JSON" data-message="<?php _e( 'Do you want to overwrite your current settings?', 'manage-notification-emails' );?>"/>
58
+ <input type="submit" class="button button-primary" id="settings-upload-submit" disabled="disabled" value="<?php _e( 'Start import', 'manage-notification-emails' );?>" />
59
+ <div class="spacer"></div>
60
+ </div>
61
+ <?php
62
+ }
63
+
64
+ if ( ! empty( $_GET['export-settings'] ) && 'famne' === $_GET['export-settings'] ) :
65
+ if ( ! headers_sent() ) {
66
+ global $famne_options;
67
+
68
+ header( 'Content-Disposition: attachment; filename="famne-settings-' . gmdate( 'Y-m-d-Hs' ) . '.json"' );
69
+ header( 'Cache-Control: no-cache, must-revalidate' );
70
+ header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' );
71
+ if ( is_array( $famne_options ) ) {
72
+ $famne_options['version'] = FA_MNE_VERSION;
73
+ }
74
+ echo wp_json_encode( $famne_options );
75
+ die;
76
+ } else {
77
+ wp_die( 'Unexpected headers found.' );
78
+ }
79
+ endif;
80
+
81
+ add_filter( 'famne_sanitize_settings_page', 'card_famne_export_settings_sanitize', 99, 3 );
82
+
83
+ function card_famne_export_settings_sanitize( $input ) {
84
+
85
+ if ( ! empty( $_FILES['settings-upload-file'] ) && isset( $_FILES['settings-upload-file']['size'] ) ) :
86
+ $file = $_FILES['settings-upload-file'];
87
+
88
+ if ( 4 === $file['error'] || 0 === $file['size'] ) :
89
+ return $input;
90
+ endif;
91
+
92
+ // Get file data.
93
+
94
+
95
+ // Check errors.
96
+ if ( $file['error'] ) {
97
+ wp_die( __( 'Error uploading file. Please try again.', 'manage-notification-emails' ) );
98
+ }
99
+
100
+ // Check file type.
101
+ if ( pathinfo( $file['name'], PATHINFO_EXTENSION ) !== 'json' ) {
102
+ wp_die( __( 'Incorrect file type.', 'manage-notification-emails' ) );
103
+ }
104
+
105
+
106
+ // Check file size.
107
+ if ( $file['size'] > 100000 ) {
108
+ wp_die( __( 'File size exceeds maximum upload limit.', 'manage-notification-emails' ) );
109
+ }
110
+
111
+ // Read JSON.
112
+ try {
113
+ $json = null;
114
+ if ( function_exists( 'file_get_contents' ) ) :
115
+ $json = file_get_contents( $file['tmp_name'] );
116
+ $json = json_decode( $json, true );
117
+ endif;
118
+ // Check if empty.
119
+ if ( ! $json || ! is_array( $json ) ) {
120
+ wp_die( __( 'Import file empty.', 'manage-notification-emails' ) );
121
+ }
122
+ } catch ( RuntimeException $e ) {
123
+ wp_die( 'Invalid parameters or file is corrupted.' );
124
+ }
125
+
126
+ // Check file size.
127
+ if ( empty( $json['version'] ) || FA_MNE_VERSION !== $json['version'] ) {
128
+ wp_die( __( 'The import file has a different plugin version.', 'manage-notification-emails' ) );
129
+ }
130
+
131
+ // Get all available options.
132
+ $available_options = array();
133
+ foreach ( FAMNE::default_options() as $key=>$o ) :
134
+ $available_options[] = $key;
135
+ endforeach;
136
+ foreach ( FAMNE::getModules() as $mod ) :
137
+ if ( ! empty( $mod->option_id ) && is_array( $mod->option_id ) ) :
138
+ foreach ( $mod->option_id as $m ) :
139
+ $available_options[] = $m;
140
+ endforeach;
141
+ endif;
142
+ endforeach;
143
+
144
+ $input = array();
145
+ foreach ( $json as $key => $val ) :
146
+ if ( in_array( $key, $available_options, true ) ) {
147
+ $input[ $key ] = sanitize_text_field( $val );
148
+ }
149
+ endforeach;
150
+ endif;
151
+
152
+ return $input;
153
+ }
154
+
155
+ }
156
+
157
+ add_action( 'fa_mne_modules', 'load_mod_famne_export_settings' );
{includes → modules/pluggable}/pluggable-functions-1.2.php RENAMED
File without changes
{includes → modules/pluggable}/pluggable-functions-1.3.php RENAMED
@@ -151,7 +151,7 @@ endif;
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;
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;
{includes → modules/pluggable}/pluggable-functions-1.5.php RENAMED
@@ -17,6 +17,12 @@ if (!defined('ABSPATH')) die();
17
 
18
  $famne_options = FAMNE::get_option( 'famne_options' );
19
 
 
 
 
 
 
 
20
  if (!function_exists('dont_send_password_change_email') ) :
21
  /**
22
  * Email password change notification to registered user.
@@ -154,7 +160,7 @@ endif;
154
 
155
  if (empty($famne_options['auto_core_update_send_email']) && !function_exists('fa_dont_sent_auto_core_update_emails') ) :
156
  /**
157
- * Send email when wordpress automatic updated.
158
  *
159
  */
160
  //echo "auto_core_update_send_email off";exit;
17
 
18
  $famne_options = FAMNE::get_option( 'famne_options' );
19
 
20
+ FAMNE::AddModule('pluggable',array(
21
+ 'name' => 'Pluggable',
22
+ 'version'=>'1.5.1'
23
+ ));
24
+
25
+
26
  if (!function_exists('dont_send_password_change_email') ) :
27
  /**
28
  * Email password change notification to registered user.
160
 
161
  if (empty($famne_options['auto_core_update_send_email']) && !function_exists('fa_dont_sent_auto_core_update_emails') ) :
162
  /**
163
+ * Send email when WordPress automatic updated.
164
  *
165
  */
166
  //echo "auto_core_update_send_email off";exit;
modules/pluggable/pluggable.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Manage notification emails version switch
4
+ *
5
+ * This file is part of the Manage Notification Emails plugin
6
+ * You can find out more about this plugin at https://www.freeamigos.nl
7
+ * Copyright (c) 2006-2015 Virgial Berveling
8
+ *
9
+ * @package WordPress
10
+ * @author Virgial Berveling
11
+ * @copyright 2006-2015
12
+ *
13
+ * since: 1.3.0
14
+ */
15
+
16
+ if ( ! defined( 'FA_MNE_PLUGIN_DIR' ) ) {
17
+ die();
18
+ }
19
+
20
+ global $wp_version;
21
+ if ( version_compare( $wp_version, '5.2.0' ) >= 0 ) {
22
+ include_once FA_MNE_PLUGIN_DIR . '/modules/pluggable/pluggable-functions-1.5.php';
23
+ } elseif ( version_compare( $wp_version, '4.7.0' ) >= 0 ) {
24
+ include_once FA_MNE_PLUGIN_DIR . '/modules/pluggable/pluggable-functions-1.3.php';
25
+ } else {
26
+ include_once FA_MNE_PLUGIN_DIR . '/modules/pluggable/pluggable-functions-1.2.php';
27
+ }
modules/settings-page/assets/main.min.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ .display-inline-block{display:inline-block}.spacer{height:20px}.section-part{position:relative;margin-bottom:20px;padding:10px 20px;border:1px solid #ccc;background-color:#fff}.section-part.border-warning{background-color:rgba(255,255,255,.5)}.section-part.border-warning .option-container{opacity:1 !important;color:red}.section-part.border-warning .option-container.active{color:inherit}.section-part.extra .dashicons-before:before{font-size:14px}.wrap.page-width{max-width:760px}.modules{position:relative;margin:0;display:flex;flex-wrap:wrap}.modules .card{display:block;max-width:440px;min-height:240px;margin:0 15px 15px 0}@media only screen and (max-width: 500px){.modules .card{margin:15px 0}}.sections-container .option-container{opacity:.5;display:block;padding-top:5px;padding-bottom:5px;position:relative;padding-left:30px}.sections-container .option-container:hover,.sections-container .option-container.active{opacity:1}.sections-container .option-container input[type=checkbox]{position:absolute;top:20px;left:0px}@media only screen and (max-width: 782px){.sections-container .option-container input[type=checkbox]{left:-7px}}.sections-container .text-container{display:block}.sections-container .text-container input[type=text],.sections-container .text-container input[type=email]{display:block;width:100%;margin:5px 0}.nav-tab{cursor:pointer}.nav-tab .dashicons-before:before{position:relative;top:2px}.nav-tab .dashicons-admin-plugins.active{opacity:1;color:#46b450}.nav-tab .dashicons-admin-plugins.inactive{opacity:1;color:#bd003f}.switch{position:relative;display:block;float:right;right:-17px;width:40px;height:17px;cursor:default}.switch input{display:none}.slider{position:absolute;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.2);-webkit-transition:.4s;transition:.4s}.slider:before{position:absolute;content:"";height:13px;width:13px;left:2px;bottom:2px;background-color:#fff;-webkit-transition:.2s;transition:.2s}.slider.active{background-color:#76d450}.slider.changing{background-color:#0073aa}.slider.active:before{-webkit-transform:translateX(23px);-ms-transform:translateX(23px);transform:translateX(23px)}.on,.off{color:#fff;position:absolute;top:0;left:5px;width:30px;font-size:8px;font-family:Verdana,sans-serif;text-align:right;user-select:none;-webkit-touch-callout:none;-webkit-user-select:none}.on{text-align:left;display:none}.active .off{display:none}.active .on{display:block}.slider.round{border-radius:17px;width:40px;height:17px}.slider.round:before{border-radius:50%}.donation-box{background-color:rgba(255,255,255,.5);margin-right:10px;padding:40px;text-align:center;color:rgba(0,0,0,.7)}
2
+
3
+ /*# sourceMappingURL=main.min.css.map?1621860351981*/
modules/settings-page/assets/main.min.css.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["webpack://local.freeamigos.nl/./src/manage-notifications-emails/main.scss"],"names":[],"mappings":"AAAA,sBAEE,qBAEF,QAEI,YAKJ,cAEI,kBACA,mBACA,kBACA,sBACA,sBAEA,6BAUI,sCARA,+CAEI,qBACA,UACA,sDACI,cAKZ,6CAEI,eAIR,iBAEI,gBAGJ,SACI,kBACA,SACA,aACA,eACA,eACI,cACA,gBACA,iBACA,qBACA,0CALJ,eAMQ,eAOZ,sCAEI,WAQA,cACA,gBACA,mBACA,kBACA,kBAXA,yFAEI,UAUJ,2DACI,kBACA,SACA,SACA,0CAJJ,2DAKQ,WAMZ,oCAEI,cAEA,2GAGI,cACA,WACA,aAIR,SAEI,eAEA,kCAEI,kBACA,QAGJ,yCAEI,UACA,cAGJ,2CAEI,UACA,cAOR,QACI,kBACA,cACA,YACA,YACA,WACA,YACA,eAGF,2BAEA,QACE,kBACA,MACA,OACA,QACA,SACA,gCACA,uBACA,eAGF,eACE,kBACA,WACA,YACA,WACA,SACA,WACA,sBACA,uBACA,eAEF,eACE,yBAEF,iBACE,yBAGF,sBACE,mCACA,+BACA,2BAIF,SAEE,WACA,kBACA,MACA,SACA,WACA,cACA,+BACA,iBACA,iBACA,2BACA,yBAEF,IAEE,gBACA,aAGF,0BACA,0BAKA,cACE,mBACA,WACA,YAGF,qBACE,kBAGJ,cACI,sCACA,kBACA,aACA,kBACA,qB","file":"main.min.css?1621860351981","sourcesContent":[".display-inline-block\n{\n display:inline-block;\n}\n.spacer\n{\n height:20px;\n}\n\n\n\n.section-part\n{\n position:relative;\n margin-bottom:20px;\n padding:10px 20px;\n border:1px solid #CCC;\n background-color:#FFF;\n\n &.border-warning\n {\n .option-container\n {\n opacity:1 !important;\n color:#F00;\n &.active{\n color:inherit;\n }\n }\n background-color:rgba(255,2555,255,.5);\n }\n &.extra .dashicons-before:before\n {\n font-size:14px;\n }\n}\n\n.wrap.page-width\n{\n max-width:760px;\n}\n\n.modules{\n position: relative;\n margin:0;\n display:flex;\n flex-wrap: wrap;\n .card{\n display:block;\n max-width:440px;\n min-height:240px;\n margin:0 15px 15px 0;\n @media only screen and (max-width: 500px) {\n margin:15px 0;\n }\n }\n}\n\n\n\n.sections-container .option-container\n {\n opacity:.5;\n &:hover,\n &.active{\n opacity:1;\n }\n\n\n\n display:block;\n padding-top:5px;\n padding-bottom:5px;\n position: relative;\n padding-left:30px;\n input[type=checkbox]{\n position: absolute;\n top:20px;\n left:0px;\n @media only screen and (max-width: 782px) {\n left:-7px;\n }\n \n }\n}\n\n.sections-container .text-container\n{\n display: block;\n\n input[type=text],\n input[type=email]\n {\n display: block;\n width:100%;\n margin:5px 0;\n }\n}\n\n.nav-tab \n{\n cursor:pointer;\n\n .dashicons-before:before\n {\n position: relative;\n top:2px;\n }\n\n .dashicons-admin-plugins.active\n {\n opacity:1;\n color:#46b450;\n }\n\n .dashicons-admin-plugins.inactive\n {\n opacity:1;\n color: rgb(189, 0, 63);;\n }\n}\n\n\n\n/*SWITCH */\n.switch {\n position: relative;\n display: block;\n float:right;\n right:-17px;\n width: 40px;\n height: 17px;\n cursor: default;\n }\n \n .switch input {display:none;}\n \n .slider {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0,0,0,.2);\n -webkit-transition: .4s;\n transition: .4s;\n }\n \n .slider:before {\n position: absolute;\n content: \"\";\n height: 13px;\n width: 13px;\n left: 2px;\n bottom: 2px;\n background-color: white;\n -webkit-transition: .2s;\n transition: .2s;\n }\n .slider.active {\n background-color: #76d450;\n }\n .slider.changing {\n background-color: #0073aa;\n }\n\n .slider.active:before {\n -webkit-transform: translateX(23px);\n -ms-transform: translateX(23px);\n transform: translateX(23px);\n }\n \n /*------ ADDED CSS ---------*/\n .on, .off\n {\n color: white;\n position: absolute;\n top:0;\n left: 5px;\n width:30px;\n font-size: 8px;\n font-family: Verdana, sans-serif;\n text-align:right;\n user-select: none;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none;\n }\n .on\n {\n text-align:left;\n display: none;\n }\n\n .active .off{ display:none;}\n .active .on{ display:block;}\n\n /*--------- END --------*/\n \n /* Rounded sliders */\n .slider.round {\n border-radius: 17px;\n width:40px;\n height:17px;\n }\n \n .slider.round:before {\n border-radius: 50%;}\n\n\n.donation-box{\n background-color:rgba(255,255,255,.5);\n margin-right:10px;\n padding:40px;\n text-align:center;\n color:rgba(0,0,0,0.7);\n}"],"sourceRoot":""}
modules/settings-page/assets/main.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ !function(e){var t,a,n="settings",s=document.location.hash.replace("#","");function i(t){e(".sections-container").addClass("hidden"),e("#sections-"+t).removeClass("hidden"),e(".nav-tab-wrapper>a").removeClass("nav-tab-active"),e(".nav-tab-wrapper>a#tab-"+t).addClass("nav-tab-active"),document.location="#"+t}e(window).on("hashchange",(function(){i(s=document.location.hash.replace("#",""))})),document.cookie.length>0&&-1!==(t=document.cookie.indexOf("famnetab="))&&(t+=9,-1===(a=document.cookie.indexOf(";",t))&&(a=document.cookie.length),n=unescape(document.cookie.substring(t,a))),""!==s&&(n=s),e(".sections-container").each((function(){var t=e(this).attr("id").replace("sections-",""),a=e(this).attr("title"),n=e(this).attr("data-icon"),s=e('<a id="tab-'+t+'" class="nav-tab">'+(""!==n?'<span class="dashicons-before '+n+'"></span>':"")+a+"</a>");s.on("click",(function(){document.cookie="famnetab="+t,i(t)})),e(".nav-tab-wrapper").append(s)})),i(n),e('input[name="famne_options[custom_admin_recipients]"]').on("change",(function(){var t=e(this).closest(".card"),a=e(this).val();if(e(this).closest(".text-container").removeClass("error"),""!==e(this).val()){e(".switch .slider",t).addClass("active");var n,s=a.split(",");for(var i in s)n=s[i].replace(" ",""),/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(n)||e(this).closest(".text-container").addClass("error")}else e(".switch .slider",t).removeClass("active")})),e(".checkbox-change").on("change",(function(){var t=e(this).closest(".option-container"),a=e(this).closest(".card");e(this).is(":checked")?t.addClass("active"):t.removeClass("active"),0===e(".option-container.active",a).length?e(".switch .slider",a).removeClass("active"):e(".switch .slider",a).addClass("active")})),e("input[type='file']#settings-upload-file").on("change",(function(){var t=e(this).attr("data-message");e("#settings-upload-submit").removeAttr("disabled").on("click",(function(){return confirm(t)}))}))}(jQuery);
2
+ //# sourceMappingURL=main.min.js.map?1621860351981
modules/settings-page/assets/main.min.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["webpack://local.freeamigos.nl/./src/manage-notifications-emails/main.js"],"names":["$","cstart","cend","stab","hash","document","location","replace","famneShowTab","tab","addClass","removeClass","window","on","cookie","length","indexOf","unescape","substring","each","slug","this","attr","title","icon","$tab","append","$card","closest","value","val","email","emails","split","i","test","$el","is","message","removeAttr","confirm","jQuery"],"mappings":"CAKE,SAAUA,GACX,IAAIC,EAAQC,EACRC,EAAO,WACPC,EAAOC,SAASC,SAASF,KAAKG,QAAS,IAAK,IA8BhD,SAASC,EAAcC,GACtBT,EAAG,uBAAwBU,SAAU,UACrCV,EAAG,aAAeS,GAAME,YAAa,UACrCX,EAAG,sBAAuBW,YAAa,kBACvCX,EAAG,0BAA4BS,GAAMC,SAAU,kBAC/CL,SAASC,SAAW,IAAMG,EA5B3BT,EAAGY,QAASC,GAAI,cAAc,WAE7BL,EADAJ,EAAOC,SAASC,SAASF,KAAKG,QAAS,IAAK,QAIxCF,SAASS,OAAOC,OAAS,IAEZ,KADjBd,EAASI,SAASS,OAAOE,QAAS,gBAEjCf,GAAkB,GAEH,KADfC,EAAOG,SAASS,OAAOE,QAAS,IAAKf,MAEpCC,EAAOG,SAASS,OAAOC,QAExBZ,EAAOc,SAAUZ,SAASS,OAAOI,UAAWjB,EAAQC,KAKxC,KAATE,IACJD,EAAOC,GAaRJ,EAAG,uBAAwBmB,MAAM,WAChC,IAAIC,EAAOpB,EAAGqB,MAAOC,KAAM,MAAOf,QAAS,YAAa,IACpDgB,EAAQvB,EAAGqB,MAAOC,KAAM,SACxBE,EAAOxB,EAAGqB,MAAOC,KAAM,aAGvBG,EAAOzB,EAAG,cAAgBoB,EAAO,sBAFb,KAATI,EAAc,iCAAmCA,EAAO,YAAc,IAEdD,EAAQ,QAC/EE,EAAKZ,GAAI,SAAS,WACjBR,SAASS,OAAS,YAAcM,EAChCZ,EAAcY,MAEfpB,EAAG,oBAAqB0B,OAAQD,MAGjCjB,EAAcL,GAEdH,EAAE,wDAAwDa,GAAG,UAAS,WACrE,IAAIc,EAAQ3B,EAAEqB,MAAMO,QAAQ,SACxBC,EAAQ7B,EAAEqB,MAAMS,MAGpB,GAFA9B,EAAEqB,MAAMO,QAAQ,mBAAmBjB,YAAY,SAEzB,KAAlBX,EAAEqB,MAAMS,MAAZ,CAKC9B,EAAE,kBAAkB2B,GAAOjB,SAAS,UAGrC,IAlEsBqB,EAkElBC,EAASH,EAAMI,MAAM,KACzB,IAAK,IAAIC,KAAKF,EAnEQD,EAqERC,EAAOE,GAAG3B,QAAQ,IAAI,IApExB,gEACC4B,KAAKJ,IAqEhB/B,EAAEqB,MAAMO,QAAQ,mBAAmBlB,SAAS,cAX7CV,EAAE,kBAAkB2B,GAAOhB,YAAY,aAiBzCX,EAAE,oBAAoBa,GAAG,UAAS,WACjC,IAAIuB,EAAMpC,EAAEqB,MAAMO,QAAQ,qBACtBD,EAAQ3B,EAAEqB,MAAMO,QAAQ,SAC5B5B,EAAEqB,MAAMgB,GAAG,YAAYD,EAAI1B,SAAS,UAAU0B,EAAIzB,YAAY,UACX,IAA/CX,EAAE,2BAA2B2B,GAAOZ,OAEvCf,EAAE,kBAAkB2B,GAAOhB,YAAY,UAEvCX,EAAE,kBAAkB2B,GAAOjB,SAAS,aAItCV,EAAE,2CAA6Ca,GAAG,UAAS,WAC1D,IAAIyB,EAAUtC,EAAEqB,MAAMC,KAAK,gBAC3BtB,EAAE,2BAA2BuC,WAAW,YAAY1B,GAAG,SAAQ,WAC9D,OAAO2B,QAAQF,SAjGhB,CAqGCG","file":"main.min.js?1621860351981","sourcesContent":["/* eslint-disable no-var */\n/* eslint-disable no-unused-vars */\n\n\n\n( function( $ ) {\n\tvar cstart, cend;\n\tvar stab = 'settings';\n\tvar hash = document.location.hash.replace( '#', '' );\n\n\tvar isEmail = function(email) {\n\t\tvar regex = /^([a-zA-Z0-9_.+-])+\\@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]{2,4})+$/;\n\t\treturn regex.test(email);\n\t}\n\n\t$( window ).on( 'hashchange', function( ) {\n\t\thash = document.location.hash.replace( '#', '' );\n\t\tfamneShowTab( hash );\n\t});\n\n\tif ( document.cookie.length > 0 ) {\n\t\tcstart = document.cookie.indexOf( 'famnetab=' );\n\t\tif ( cstart !== -1 ) {\n\t\t\tcstart = cstart + 9;\n\t\t\tcend = document.cookie.indexOf( ';', cstart );\n\t\t\tif ( cend === -1 ) {\n\t\t\t\tcend = document.cookie.length;\n\t\t\t}\n\t\t\tstab = unescape( document.cookie.substring( cstart, cend ) );\n\t\t}\n\t}\n\n\n\tif ( hash !== '' ) {\n\t\tstab = hash;\n\t}\n\n\n\tfunction famneShowTab( tab ) {\n\t\t$( '.sections-container' ).addClass( 'hidden' );\n\t\t$( '#sections-' + tab ).removeClass( 'hidden' );\n\t\t$( '.nav-tab-wrapper>a' ).removeClass( 'nav-tab-active' );\n\t\t$( '.nav-tab-wrapper>a#tab-' + tab ).addClass( 'nav-tab-active' );\n\t\tdocument.location = '#' + tab;\n\t}\n\n\n\t$( '.sections-container' ).each( function( ) {\n\t\tvar slug = $( this ).attr( 'id' ).replace( 'sections-', '' );\n\t\tvar title = $( this ).attr( 'title' );\n\t\tvar icon = $( this ).attr( 'data-icon' );\n\t\tvar iconhtml = icon !== '' ? '<span class=\"dashicons-before ' + icon + '\"></span>' : '';\n\n\t\tvar $tab = $( '<a id=\"tab-' + slug + '\" class=\"nav-tab\">' + iconhtml + title + '</a>' );\n\t\t$tab.on( 'click', function() {\n\t\t\tdocument.cookie = 'famnetab=' + slug;\n\t\t\tfamneShowTab( slug );\n\t\t});\n\t\t$( '.nav-tab-wrapper' ).append( $tab );\n\t});\n\n\tfamneShowTab( stab );\n\n\t$('input[name=\"famne_options[custom_admin_recipients]\"]').on('change',function(){\n\t\tvar $card = $(this).closest('.card');\n\t\tvar value = $(this).val();\n\t\t$(this).closest('.text-container').removeClass('error');\n\n\t\tif ($(this).val() === '')\n\t\t{\n\t\t\t$('.switch .slider',$card).removeClass('active');\n\t\t\treturn ;\n\t\t}else{\n\t\t\t$('.switch .slider',$card).addClass('active');\n\t\t}\n\n\t\tvar emails = value.split(',');\n\t\tfor (var i in emails)\n\t\t{\n\t\t\tif (!isEmail(emails[i].replace(' ','')))\n\t\t\t{\n\t\t\t\t$(this).closest('.text-container').addClass('error');\n\t\t\t}\n\t\t}\n\t});\n\n\n\t$('.checkbox-change').on('change',function(){\n\t\tvar $el = $(this).closest('.option-container');\n\t\tvar $card = $(this).closest('.card');\n\t\t$(this).is(':checked')?$el.addClass('active'):$el.removeClass('active');\n\t\tif ($('.option-container.active',$card).length === 0)\n\t\t{\n\t\t\t$('.switch .slider',$card).removeClass('active');\n\t\t}else{\n\t\t\t$('.switch .slider',$card).addClass('active');\n\t\t}\n\t});\n\n\t$('input[type=\\'file\\']#settings-upload-file').on('change',function(){\n\t\tvar message = $(this).attr('data-message');\n\t\t$('#settings-upload-submit').removeAttr('disabled').on('click',function(){\n\t\t\treturn confirm(message);\n\t\t});\n\t});\n\n}( jQuery ) );\n\n"],"sourceRoot":""}
modules/settings-page/class.FAMNESettingsPage.php ADDED
@@ -0,0 +1,383 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Manage notification emails settings page class
4
+ *
5
+ * Displays the settings page.
6
+ *
7
+ * This file is part of the Manage Notification Emails plugin
8
+ * You can find out more about this plugin at https://www.freeamigos.nl
9
+ * Copyright (c) 2006-2015 Virgial Berveling
10
+ *
11
+ * @package WordPress
12
+ * @author Virgial Berveling
13
+ * @copyright 2006-2015
14
+ *
15
+ * version: 1.3.0
16
+ */
17
+
18
+ if ( ! class_exists( 'FAMNESettingsPage' ) ) :
19
+
20
+ /**
21
+ * FAMNESettingsPage
22
+ */
23
+ class FAMNESettingsPage {
24
+
25
+ private $options;
26
+ const MENU_SLUG = 'famne-admin';
27
+ const MENU_NETWORK_SLUG = 'famne-network-admin';
28
+ private $tabs = array();
29
+ private static $sections = array();
30
+
31
+ /**
32
+ * Start up
33
+ */
34
+ public function __construct() {
35
+ add_action( 'admin_init', array( $this, 'page_init' ) );
36
+ if ( current_user_can( 'manage_network_options' ) ) :
37
+ add_action( 'network_admin_menu', array( $this, 'network_admin_menu' ) );
38
+ add_action( 'network_admin_edit_famnesavenetwork', array( $this, 'save_networksettings' ) );
39
+ add_action( 'network_admin_notices', array( $this, 'custom_notices' ) );
40
+ endif;
41
+ add_action( 'admin_menu', array( $this, 'admin_menu' ) );
42
+
43
+ add_filter( 'plugin_action_links_' . FA_MNE_PLUGIN_BASENAME, array( $this, 'add_action_links' ) );
44
+ add_action( 'init', array( $this, 'famne_load_textdomain' ) );
45
+
46
+ }
47
+
48
+ /**
49
+ * Add options page
50
+ */
51
+ public function network_admin_menu() {
52
+ // This page will be under "Settings".
53
+ add_submenu_page(
54
+ 'settings.php', // Parent element.
55
+ 'Notification e-mails', // Text in browser title bar.
56
+ 'Notification e-mails', // Text to be displayed in the menu.
57
+ 'manage_options', // Capability.
58
+ self::MENU_NETWORK_SLUG, // Page slug, will be displayed in URL.
59
+ array( $this, 'print_admin_page' )
60
+ );
61
+
62
+ $this->addTabs();
63
+ add_action( 'admin_init', array( $this, 'load_scripts' ) );
64
+ }
65
+
66
+ /**
67
+ * Add options page
68
+ */
69
+ public function admin_menu() {
70
+ // This page will be under "Settings".
71
+ add_options_page(
72
+ 'Settings Admin',
73
+ 'Notification e-mails',
74
+ 'manage_options',
75
+ self::MENU_SLUG,
76
+ array( $this, 'print_admin_page' )
77
+ );
78
+
79
+ $this->addTabs();
80
+ add_action( 'admin_init', array( $this, 'load_scripts' ) );
81
+ }
82
+
83
+
84
+ public function custom_notices() {
85
+
86
+ if ( self::is_famne_network_settings_page() && isset( $_GET['updated'] ) ) {
87
+ echo '<div id="message" class="updated notice is-dismissible"><p>Settings updated.</p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>';
88
+ }
89
+ }
90
+
91
+
92
+ /**
93
+ * Add Tabs
94
+ *
95
+ * @return void
96
+ */
97
+ private function addTabs() {
98
+ if ( self::is_famne_network_settings_page() ) :
99
+ $this->tabs[5] = array(
100
+ 'title' => __( 'Network options', 'manage-notification-emails' ),
101
+ 'slug' => 'network',
102
+ 'view_file' => 'network.php',
103
+ 'icon' => 'dashicons-admin-multisite',
104
+ );
105
+ endif;
106
+
107
+ if ( ! self::is_famne_network_settings_page() || FAMNE::get_option( 'famne_network_managed' ) ) :
108
+
109
+ $this->tabs[10] = array(
110
+ 'title' => __( 'Core options', 'manage-notification-emails' ),
111
+ 'slug' => 'settings',
112
+ 'view_file' => 'settings.php',
113
+ 'icon' => 'dashicons-admin-settings',
114
+ );
115
+ $this->tabs[30] = array(
116
+ 'title' => __( 'Modules', 'manage-notification-emails' ),
117
+ 'slug' => 'modules',
118
+ 'view_file' => 'modules.php',
119
+ 'icon' => 'dashicons-admin-plugins',
120
+ );
121
+ $this->tabs[90] = array(
122
+ 'title' => __( 'Information', 'manage-notification-emails' ),
123
+ 'slug' => 'extra',
124
+ 'view_file' => 'extra.php',
125
+ 'icon' => 'dashicons-editor-help',
126
+ );
127
+ endif;
128
+ }
129
+
130
+
131
+ /**
132
+ * Register and add settings
133
+ */
134
+ public function page_init() {
135
+
136
+ register_setting(
137
+ 'famne_option_group', // Option group.
138
+ 'famne_options', // Option name.
139
+ array( $this, 'sanitize' ) // Sanitize.
140
+ );
141
+
142
+ add_settings_section(
143
+ 'setting_section_id', // ID.
144
+ '', // Title.
145
+ array( $this, 'print_section_info' ), // Callback.
146
+ self::MENU_SLUG // Page.
147
+ );
148
+ }
149
+
150
+ /**
151
+ * Check if is_famne_settings_page
152
+ *
153
+ * @return boolean
154
+ */
155
+ public static function is_famne_settings_page() {
156
+ global $pagenow;
157
+ $getpage = isset( $_GET['page'] ) ? sanitize_text_field( $_GET['page'] ) : '';
158
+ $is_admin_page = 'options-general.php' === $pagenow && self::MENU_SLUG === $getpage;
159
+ return $is_admin_page;
160
+ }
161
+
162
+ /**
163
+ * Check if is_famne_network_settings_page
164
+ *
165
+ * @return boolean
166
+ */
167
+ public static function is_famne_network_settings_page() {
168
+ global $pagenow;
169
+ $getpage = isset( $_GET['page'] ) ? sanitize_text_field( $_GET['page'] ) : '';
170
+ $is_network_admin_page = 'settings.php' === $pagenow && self::MENU_NETWORK_SLUG === $getpage;
171
+ return $is_network_admin_page;
172
+ }
173
+
174
+ /**
175
+ * Load_scripts
176
+ *
177
+ * @return void
178
+ */
179
+ public function load_scripts() {
180
+ if ( ! self::is_famne_settings_page() && ! self::is_famne_network_settings_page() ) {
181
+ return;
182
+ }
183
+
184
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
185
+ }
186
+
187
+
188
+ /**
189
+ * Sanitize each setting field as needed
190
+ *
191
+ * @param array $input Contains all settings fields as array keys.
192
+ */
193
+ public function sanitize( $input ) {
194
+ if ( empty( $input ) ) {
195
+ $input = array();
196
+ }
197
+ $new_input = array();
198
+
199
+ foreach ( $input as $key => $val ) {
200
+ $new_input[ $key ] = '1' === strval( $val ) ? '1' : '';
201
+ }
202
+
203
+ foreach ( FAMNE::getModules() as $mod ) :
204
+ if ( ! empty( $mod->option_id ) && is_array( $mod->option_id ) ) :
205
+ foreach ( $mod->option_id as $m ) :
206
+ if ( isset( $input[ $m ] ) ) {
207
+ $new_input[ $m ] = $input[ $m ];
208
+ }
209
+ endforeach;
210
+ endif;
211
+ endforeach;
212
+
213
+ $new_input = apply_filters( 'famne_sanitize_settings_page', $new_input );
214
+
215
+ return $new_input;
216
+ }
217
+
218
+
219
+ public function save_networksettings() {
220
+
221
+ if ( ! current_user_can( 'manage_network_options' ) ) {
222
+ check_admin_referer( 'fake_info_action', 'fake_info' );
223
+ exit;
224
+ }
225
+
226
+ if ( ! empty( $_POST ) && check_admin_referer( 'famnenetwork_save', 'famnenetwork' ) ) {
227
+
228
+ $network_activated = FAMNE::get_option( 'famne_network_managed');
229
+ $network_managed = ! empty( $_POST['famne_options'] ) && '1' === $_POST['famne_options']['network_managed'] ? '1' : null;
230
+ FAMNE::update_option( 'famne_network_managed', $network_managed );
231
+
232
+ if ( $network_managed ) :
233
+ $options = $_POST['famne_options'];
234
+
235
+ if ( empty( $network_activated ) ) :
236
+ $options = FAMNE::default_options();
237
+ endif;
238
+
239
+ $options = $this->sanitize( $options );
240
+
241
+ FAMNE::update_option( 'famne_options', $options );
242
+ endif;
243
+
244
+ wp_safe_redirect(
245
+ add_query_arg(
246
+ array(
247
+ 'page' => self::MENU_NETWORK_SLUG,
248
+ 'updated' => true,
249
+ ),
250
+ network_admin_url( 'settings.php' )
251
+ )
252
+ );
253
+ exit;
254
+ }
255
+ }
256
+
257
+ /**
258
+ * Print admin_page
259
+ *
260
+ * @return void
261
+ */
262
+ public function print_admin_page() {
263
+ global $famne_options;
264
+ global $pagenow;
265
+
266
+ if ( ! empty( $_GET['famne_reset'] ) ) :
267
+ if ( strval( $_GET['famne_reset'] ) === '1' ) :
268
+ if ( self::is_famne_settings_page() ) :
269
+ delete_option( 'fa_mne_version' );
270
+ delete_option( 'famne_options' );
271
+ FAMNE::install();
272
+ echo "<script>document.location='options-general.php?page=famne-admin&famne_reset=2'</script>";
273
+ elseif ( self::is_famne_network_settings_page() ) :
274
+ delete_site_option( 'fa_mne_version' );
275
+ delete_site_option( 'famne_options' );
276
+ FAMNE::install();
277
+ echo "<script>document.location='options-general.php?page=famne-admin&famne_reset=2'</script>";
278
+ endif;
279
+ exit;
280
+ endif;
281
+ endif;
282
+
283
+ $famne_options = FAMNE::get_option( 'famne_options' );
284
+
285
+ foreach ( $this->tabs as $key => $tab ) :
286
+ self::register_section( $tab, $key );
287
+ endforeach;
288
+ do_action( 'famne_register_settings_section' );
289
+
290
+ if ( self::is_famne_network_settings_page() ) :
291
+ include_once dirname( __FILE__ ) . '/views/container-network.php';
292
+ else :
293
+ include_once dirname( __FILE__ ) . '/views/container.php';
294
+ endif;
295
+ }
296
+
297
+ /**
298
+ * Register section
299
+ *
300
+ * @param mixed $section
301
+ * @param mixed $ord
302
+ * @return void
303
+ */
304
+ public static function register_section( $section, $ord = 99 ) {
305
+ self::$sections[ $ord ] = $section;
306
+ }
307
+
308
+ /**
309
+ * Print registered sections
310
+ *
311
+ * @param mixed $output
312
+ * @return void
313
+ */
314
+ public static function print_sections( $output = true ) {
315
+
316
+ require_once dirname( __FILE__ ) . '/formfields.php';
317
+
318
+ ksort( self::$sections );
319
+ foreach ( self::$sections as &$section ) {
320
+ $icon = ! empty( $section['icon'] ) ? 'data-icon="' . $section['icon'] . '"' : '';
321
+ echo PHP_EOL;
322
+ echo '<div class="sections-container" id="sections-' . $section['slug'] . '" title="' . ucfirst( __( $section['title'] ) ) . '" ' . $icon . '>';
323
+
324
+ if ( ! empty( $section['view_file'] ) ) :
325
+
326
+ include_once FA_MNE_PLUGIN_DIR . '/modules/settings-page/' . '/views/' . basename( $section['view_file'] );
327
+ endif;
328
+ if ( ! empty( $section['html'] ) ) {
329
+ echo $section['html'];
330
+ }
331
+ echo '</div>';
332
+ echo PHP_EOL;
333
+ }
334
+ }
335
+
336
+ /**
337
+ * Enqueue scripts
338
+ *
339
+ * @param mixed $hook
340
+ * @return void
341
+ */
342
+ public function enqueue_scripts( $hook ) {
343
+
344
+ wp_enqueue_style(
345
+ 'famne-settings-page',
346
+ plugins_url( '/modules/settings-page/assets/main.min.css', FA_MNE_PLUGIN_BASENAME ),
347
+ null,
348
+ time()
349
+ );
350
+
351
+ wp_enqueue_script(
352
+ 'famne-settings-page',
353
+ plugins_url( '/modules/settings-page/assets/main.min.js', FA_MNE_PLUGIN_BASENAME ),
354
+ array( 'jquery' ),
355
+ time(),
356
+ true
357
+ );
358
+ }
359
+
360
+ /**
361
+ * Add_ plugin settings link
362
+ *
363
+ * @param mixed $links
364
+ * @return string
365
+ */
366
+ public function add_action_links( $links ) {
367
+ $mylinks = array(
368
+ '<a href="' . admin_url( 'options-general.php?page=famne-admin' ) . '">' . __( 'Settings' ) . '</a>',
369
+ );
370
+ return array_merge( $links, $mylinks );
371
+ }
372
+
373
+ /**
374
+ * Translations.
375
+ *
376
+ * @since 1.4.2
377
+ */
378
+ public function famne_load_textdomain() {
379
+ load_plugin_textdomain( FA_MNE_SLUG, false, basename( FA_MNE_PLUGIN_DIR ) . '/languages' );
380
+ }
381
+ }
382
+
383
+ endif;
modules/settings-page/formfields.php ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Form fields.
4
+ *
5
+ * This file is part of the Manage Notification Emails plugin
6
+ * You can find out more about this plugin at https://www.freeamigos.nl
7
+ * Copyright (c) 2006-2015 Virgial Berveling
8
+ *
9
+ * @package WordPress
10
+ * @author Virgial Berveling
11
+ * @copyright 2006-2015
12
+ *
13
+ * since: 1.3.0
14
+ */
15
+
16
+ if ( ! defined( 'ABSPATH' ) || ! class_exists( 'FAMNESettingsPage', false ) ) {
17
+ exit;
18
+ }
19
+
20
+
21
+
22
+ /**
23
+ * Print start_table_form.
24
+ *
25
+ * @return void
26
+ */
27
+ function print_start_table_form() {
28
+ ?>
29
+ <table class="form-table"><tbody>
30
+ <?php
31
+ }
32
+
33
+ /**
34
+ * Print end_table_form.
35
+ *
36
+ * @return void
37
+ */
38
+ function print_end_table_form() {
39
+ ?>
40
+ </tbody></table>
41
+ <?php
42
+ }
43
+
44
+ /**
45
+ * Print checkbox.
46
+ *
47
+ * @param mixed $options
48
+ * @param mixed $id
49
+ * @param mixed $title
50
+ * @param mixed $label
51
+ * @param mixed $message
52
+ * @return void
53
+ */
54
+ function print_checkbox( $options, $id, $title, $label = '', $message = '' ) {
55
+ $checked = isset( $options[ $id ] ) && '1' === strval( $options[ $id ] ) ? true : false;
56
+
57
+ print '<div class="option-container ' . ( $checked ? 'active' : '' ) . '">';
58
+ print '<label><input type="checkbox" name="famne_options[' . $id . ']" value="1" ' . ( $checked ? 'checked="checked"' : '' ) . ' class="checkbox-change"/>';
59
+ print '<strong>' . $title . '</strong><br/>' . $label;
60
+ print '</label>';
61
+ print '<p class="description">' . $message . '</p>';
62
+ print '</div>';
63
+ }
64
+
65
+ /**
66
+ * Print textbox.
67
+ *
68
+ * @param mixed $options
69
+ * @param mixed $id
70
+ * @param mixed $title
71
+ * @param mixed $label
72
+ * @param mixed $message
73
+ * @param mixed $type
74
+ * @param mixed $placeholder
75
+ * @return void
76
+ */
77
+ function print_textbox( $options, $id, $title, $label = '', $message = '', $type = 'text', $placeholder = '' ) {
78
+ $value = isset( $options[ $id ] ) && ! empty( $options[ $id ] ) ? $options[ $id ] : '';
79
+
80
+ print '<div class="text-container ' . ( ! empty( $value ) ? 'active' : '' ) . '">';
81
+ print '<br/><strong>' . $title . '</strong><br/>';
82
+ print '<label><input type="' . $type . '" name="famne_options[' . $id . ']" placeholder="' . $placeholder . '" value="' . esc_attr( $value ) . '" />';
83
+ print $label;
84
+ print '</label>';
85
+ print '<p class="description">' . $message . '</p>';
86
+ print '</div>';
87
+ }
modules/settings-page/settings-page.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Manage notification emails settings page class
4
+ * *
5
+ * This file is part of the Manage Notification Emails plugin
6
+ * You can find out more about this plugin at https://www.freeamigos.nl
7
+ * Copyright (c) 2006-2015 Virgial Berveling
8
+ *
9
+ * @package WordPress
10
+ * @author Virgial Berveling
11
+ * @copyright 2006-2020
12
+ *
13
+ * since: 1.6.0
14
+ */
15
+
16
+ // Exit if accessed directly.
17
+ if ( ! defined( 'ABSPATH' ) ) {
18
+ exit;
19
+ }
20
+
21
+ /**
22
+ * Load module famne_settings_page
23
+ *
24
+ * @return void
25
+ */
26
+ function load_mod_famne_settings_page() {
27
+ if ( is_admin() ) :
28
+ FAMNE::AddModule(
29
+ 'settings_page',
30
+ array(
31
+ 'name' => 'Settings page',
32
+ 'version' => '1.0.0',
33
+ )
34
+ );
35
+
36
+ include_once FA_MNE_PLUGIN_DIR . '/modules/settings-page/class.FAMNESettingsPage.php';
37
+ new FAMNESettingsPage();
38
+ endif;
39
+ }
40
+
41
+ add_action( 'fa_mne_modules', 'load_mod_famne_settings_page' );
modules/settings-page/views/container-network.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Custom view
4
+ *
5
+ * This file is part of the Manage Notification Emails plugin
6
+ * You can find out more about this plugin at https://www.freeamigos.nl
7
+ * Copyright (c) 2006-2015 Virgial Berveling
8
+ *
9
+ * @package WordPress
10
+ * @author Virgial Berveling
11
+ * @copyright 2006-2015
12
+ *
13
+ * since: 1.8.0
14
+ */
15
+
16
+ if ( ! defined( 'ABSPATH' ) || ! class_exists( 'FAMNESettingsPage', false ) ) {
17
+ exit;
18
+ }
19
+ ?>
20
+ <div class="wrap">
21
+ <h2><?php _e( 'Manage the notification e-mails', 'manage-notification-emails' ); ?> <small><small><?php _e( 'version', 'manage-notification-emails' ); ?> <?php echo FA_MNE_VERSION; ?></small></small></h2>
22
+ <form method="post" action="edit.php?action=famnesavenetwork" enctype="multipart/form-data">
23
+ <?php
24
+ wp_nonce_field( 'famnenetwork_save', 'famnenetwork' );
25
+
26
+ _e( 'Manage your notification e-mail preferences below.', 'manage-notification-emails' );
27
+ ?>
28
+ <br/>
29
+ <br/>
30
+ <div class="nav-tab-wrapper"></div>
31
+ <div class="spacer"></div>
32
+ <div class="sections-wrapper">
33
+ <?php
34
+ // This prints out all hidden setting fields.
35
+ settings_fields( 'famne_option_group' );
36
+ FAMNESettingsPage::print_sections();
37
+ ?>
38
+ <?php submit_button(); ?>
39
+ </div>
40
+ <div class="clear"></div>
41
+ </form>
42
+ </div>
43
+ <?php
44
+ require_once dirname( __FILE__ ) . '/donatebox.php';
modules/settings-page/views/container.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Custom view
4
+ *
5
+ * This file is part of the Manage Notification Emails plugin
6
+ * You can find out more about this plugin at https://www.freeamigos.nl
7
+ * Copyright (c) 2006-2015 Virgial Berveling
8
+ *
9
+ * @package WordPress
10
+ * @author Virgial Berveling
11
+ * @copyright 2006-2015
12
+ *
13
+ * since: 1.3.0
14
+ */
15
+
16
+ if ( ! defined( 'ABSPATH' ) || ! class_exists( 'FAMNESettingsPage', false ) ) {
17
+ exit;
18
+ }
19
+ $managed_by_network = ! empty( FAMNE::get_option( 'famne_network_managed' ) );
20
+
21
+ ?>
22
+ <div class="wrap">
23
+ <h2><?php _e( 'Manage the notification e-mails', 'manage-notification-emails' ); ?> <small><small><?php _e( 'version', 'manage-notification-emails' ); ?> <?php echo FA_MNE_VERSION; ?></small></small></h2>
24
+ <?php
25
+ if ( $managed_by_network ) :
26
+ ?>
27
+ <div class="spacer"></div>
28
+ <div class="section-part network" style="text-align:center">
29
+ <div style="text-align:center;height:60px;padding-top:20px;padding-right:50px"><span class="dashicons dashicons-admin-multisite" style="font-size:50px"></span></div>
30
+ <h3 class="title" style="color:#76d450"><?php _e( 'Site managed by network manager', 'manage-notification-emails' ); ?></h3>
31
+ <?php _e( 'Manage notification e-mails settings for this site are globally managed in the multisite network settings menu.', 'manage-notification-emails' ); ?>
32
+ <div class="spacer"></div>
33
+ </div>
34
+ <div class="spacer"></div>
35
+ <?php
36
+ else :
37
+ _e( 'Manage your notification e-mail preferences below.', 'manage-notification-emails' );
38
+ ?>
39
+ <form method="post" action="options.php?" enctype="multipart/form-data">
40
+
41
+ <br/>
42
+ <br/>
43
+ <div class="nav-tab-wrapper"></div>
44
+ <div class="spacer"></div>
45
+ <div class="sections-wrapper">
46
+ <?php
47
+ // This prints out all hidden setting fields.
48
+ settings_fields( 'famne_option_group' );
49
+ FAMNESettingsPage::print_sections();
50
+ ?>
51
+ <?php submit_button(); ?>
52
+ </div>
53
+ <div class="clear"></div>
54
+ </form>
55
+ <?php
56
+ endif;
57
+ ?>
58
+ </div>
59
+ <?php
60
+ if ( ! $managed_by_network ) :
61
+ require_once dirname( __FILE__ ) . '/donatebox.php';
62
+ endif;
modules/settings-page/views/donatebox.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Custom view
4
+ *
5
+ * This file is part of the Manage Notification Emails plugin
6
+ * You can find out more about this plugin at https://www.freeamigos.nl
7
+ * Copyright (c) 2006-2015 Virgial Berveling
8
+ *
9
+ * @package WordPress
10
+ * @author Virgial Berveling
11
+ * @copyright 2006-2015
12
+ *
13
+ * since: 1.3.0
14
+ */
15
+
16
+ ?>
17
+ <div class="donation-box">
18
+ <p class="description"><?php _e( 'If you find this plugin useful, you can show your appreciation here :-)', 'manage-notification-emails' ); ?></p>
19
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
20
+ <input type="hidden" name="cmd" value="_s-xclick"/>
21
+ <input type="hidden" name="hosted_button_id" value="LTZWTLEDPULFE"/>
22
+ <input type="image" src="https://www.paypalobjects.com/nl_NL/NL/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal"/>
23
+ <img alt="" border="0" src="https://www.paypalobjects.com/nl_NL/i/scr/pixel.gif" width="1" height="1"/>
24
+ </form>
25
+ </div>
26
+ <div class="clear"></div>
modules/settings-page/views/extra.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Custom view
4
+ *
5
+ * This file is part of the Manage Notification Emails plugin
6
+ * You can find out more about this plugin at https://www.freeamigos.nl
7
+ * Copyright (c) 2006-2015 Virgial Berveling
8
+ *
9
+ * @package WordPress
10
+ * @author Virgial Berveling
11
+ * @copyright 2006-2015
12
+ *
13
+ * since: 1.3.0
14
+ */
15
+
16
+ if ( ! defined( 'ABSPATH' ) || ! class_exists( 'FAMNE', false ) ) {
17
+ exit;
18
+ }
19
+ global $famne_options;
20
+ ?>
21
+
22
+ <div class="wrap page-width">
23
+ <h3><?php _e( 'Information', 'manage-notification-emails' ); ?></h3>
24
+ <div class="section-part extra">
25
+ <h3><?php _e( 'Available Manage Notification E-mail Modules', 'manage-notification-emails' ); ?></h3>
26
+ <ul>
27
+ <?php
28
+ $modules = FAMNE::getModules();
29
+ foreach ( $modules as $module ) :
30
+ $icon = $module->licensed ? 'dashicons-products"' : 'dashicons-admin-plugins';
31
+ ?>
32
+ <li><span class="dashicons-before <?php echo $icon; ?>"></span><?php echo $module->name; ?> (<?php echo $module->version; ?>)</li>
33
+ <?php endforeach; ?>
34
+ </ul>
35
+ </div>
36
+ </div>
modules/settings-page/views/modules.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Custom view
4
+ *
5
+ * This file is part of the Manage Notification Emails plugin
6
+ * You can find out more about this plugin at https://www.freeamigos.nl
7
+ * Copyright (c) 2006-2015 Virgial Berveling
8
+ *
9
+ * @package WordPress
10
+ * @author Virgial Berveling
11
+ * @copyright 2006-2015
12
+ *
13
+ * since: 1.3.0
14
+ */
15
+
16
+ if ( ! defined( 'ABSPATH' ) || ! class_exists( 'FAMNESettingsPage', false ) ) {
17
+ exit;
18
+ }
19
+ global $famne_options;
20
+
21
+ ?>
22
+
23
+ <div class="wrap">
24
+ <h3><?php _e( 'Extra modules', 'manage-notification-emails' ); ?></h3>
25
+ <p><?php _e( 'The modules below are options which are not available in WordPress by default.', 'manage-notification-emails' ); ?></p>
26
+ <div class="spacer"></div>
27
+ <div class="modules">
28
+ <?php
29
+ foreach ( FAMNE::getModules() as $mod ) :
30
+ if ( ! in_array( $mod->slug, array( 'pluggable', 'settings_page' ), true ) && ! empty( $mod->card ) ) {
31
+ call_user_func( $mod->card, $famne_options );
32
+ }
33
+ endforeach;
34
+
35
+ if ( current_user_can( 'manage_network_options' ) ) :
36
+ ?>
37
+ <div class="card" style="text-align:center">
38
+ <div style="text-align:center;height:60px;padding-top:20px;padding-right:50px"><span class="dashicons dashicons-admin-multisite" style="font-size:50px"></span></div>
39
+ <h3 class="title" style="color:#76d450"><?php _e( 'Multisite managed settings available', 'manage-notification-emails' ); ?></h3>
40
+ <?php _e( 'For this environment, it is possible for you to manage all settings globally in the network settings menu.' ); ?>
41
+ <div class="spacer"></div>
42
+ </div>
43
+ <?php endif; ?>
44
+ </div>
45
+ </div>
modules/settings-page/views/network.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Custom view
4
+ *
5
+ * This file is part of the Manage Notification Emails plugin
6
+ * You can find out more about this plugin at https://www.freeamigos.nl
7
+ * Copyright (c) 2006-2015 Virgial Berveling
8
+ *
9
+ * @package WordPress
10
+ * @author Virgial Berveling
11
+ * @copyright 2006-2015
12
+ *
13
+ * since: 1.8.0
14
+ */
15
+
16
+ if ( ! defined( 'ABSPATH' ) || ! class_exists( 'FAMNESettingsPage', false ) ) {
17
+ exit;
18
+ }
19
+ $famne_options = FAMNE::get_option( 'famne_options' );
20
+ if ( is_array( $famne_options ) ) :
21
+ $famne_options = array();
22
+ endif;
23
+
24
+ $famne_options['network_managed'] = FAMNE::get_option( 'famne_network_managed' );
25
+
26
+
27
+ ?>
28
+ <div class="wrap page-width">
29
+ <h3><?php _e( 'Manage multisite options', 'manage-notification-emails' ); ?></h3>
30
+ <p><?php _e( 'Here you can choose to manage all options for this plugin in one location. No hassle with toggling options on and off for each subsite individually.', 'manage-notification-emails' ); ?></p>
31
+ <div class="section-part">
32
+ <?php
33
+ print_checkbox( $famne_options, 'network_managed', __( 'Use the network settings.', 'manage-notification-emails' ), __( 'Checking this option will disable per site management. All sites will use these global network settings.', 'manage-notification-emails' ) );
34
+ ?>
35
+ </div>
36
+ </div>
modules/settings-page/views/settings.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Custom view
4
+ *
5
+ * This file is part of the Manage Notification Emails plugin
6
+ * You can find out more about this plugin at https://www.freeamigos.nl
7
+ * Copyright (c) 2006-2015 Virgial Berveling
8
+ *
9
+ * @package WordPress
10
+ * @author Virgial Berveling
11
+ * @copyright 2006-2015
12
+ *
13
+ * since: 1.3.0
14
+ */
15
+
16
+ if ( ! defined( 'ABSPATH' ) || ! class_exists( 'FAMNESettingsPage', false ) ) {
17
+ exit;
18
+ }
19
+ global $famne_options;
20
+ ?>
21
+ <div class="wrap page-width">
22
+ <h3><?php _e( 'Options for e-mails to users', 'manage-notification-emails' ); ?></h3>
23
+ <div class="section-part">
24
+ <?php
25
+ print_checkbox( $famne_options, 'wp_new_user_notification_to_user', __( 'New user notification to user', 'manage-notification-emails' ), __( 'Send e-mail with login credentials to a newly-registered user.', 'manage-notification-emails' ) );
26
+ print_checkbox( $famne_options, 'wp_notify_postauthor', __( 'Notify post author', 'manage-notification-emails' ), __( 'Send e-mail to an author (and/or others) of a comment/trackback/pingback on a post.', 'manage-notification-emails' ) );
27
+ print_checkbox( $famne_options, 'wp_notify_moderator', __( 'Notify moderator', 'manage-notification-emails' ), __( 'Send e-mail to the moderator of the blog about a new comment that is awaiting approval.', 'manage-notification-emails' ) );
28
+ print_checkbox( $famne_options, 'send_password_change_email', __( 'Password change notification to user', 'manage-notification-emails' ), __( 'Send e-mail to registered user about changing his or her password. Be careful with this option, because when unchecked, the forgotten password request e-mails will be blocked too.', 'manage-notification-emails' ) );
29
+ print_checkbox( $famne_options, 'send_email_change_email', __( 'E-mail address change notification to user', 'manage-notification-emails' ), __( 'Send e-mail to registered user about changing his or her E-mail address.', 'manage-notification-emails' ) );
30
+ print_checkbox( $famne_options, 'send_password_forgotten_email', __( 'Password forgotten e-mail to user', 'manage-notification-emails' ), __( 'Send the forgotten password e-mail to registered user.<br/>(To prevent locking yourself out, sending of the forgotten password e-mail for administrators will still work)', 'manage-notification-emails' ) );
31
+ ?>
32
+ </div>
33
+ <br/>
34
+ <h2><?php _e( 'Options for e-mails to administrators', 'manage-notification-emails' ); ?></h2>
35
+ <div class="section-part">
36
+ <?php
37
+ print_start_table_form();
38
+ print_checkbox( $famne_options, 'wp_new_user_notification_to_admin', __( 'New user notification to admin', 'manage-notification-emails' ), __( 'Sends an e-mail to the site admin after a new user is registered.', 'manage-notification-emails' ) );
39
+ 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' ) );
40
+
41
+ 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' ) );
42
+ 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' ) );
43
+ 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' ) );
44
+ print_end_table_form();
45
+ ?>
46
+ </div>
47
+ <div class="section-part border-warning">
48
+ <?php
49
+ print_start_table_form();
50
+ print_checkbox( $famne_options, 'send_password_admin_forgotten_email', __( 'Password forgotten e-mail to administrator', 'manage-notification-emails' ), __( 'Send the forgotten password e-mail to administrators.', 'manage-notification-emails' ), __( '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' ) );
51
+ print_end_table_form();
52
+ ?>
53
+ </div>
54
+ <p style="float:right"><a href="#" onclick="resetToDefaults();return false" class="button"><?php _e( 'Reset settings', 'manage-notification-emails' ); ?></a></p>
55
+ </div>
56
+ <script>
57
+ function resetToDefaults(){
58
+ var r = confirm('reset to default settings?');
59
+ if (r == true) document.location='options-general.php?page=famne-admin&famne_reset=1';
60
+ }
61
+ </script>
modules/settings-page/views/sidebar.php ADDED
File without changes
modules/user-email-changed.php ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Manage notification emails settings page class
4
+ * *
5
+ * This file is part of the Manage Notification Emails plugin
6
+ * You can find out more about this plugin at https://www.freeamigos.nl
7
+ * Copyright (c) 2006-2015 Virgial Berveling
8
+ *
9
+ * @package WordPress
10
+ * @author Virgial Berveling
11
+ * @copyright 2006-2020
12
+ *
13
+ * since: 1.7.0
14
+ */
15
+
16
+ // phpcs:disable WordPress.Security.NonceVerification.Missing
17
+ // phpcs:disable WordPress.WP.I18n.MissingTranslatorsComment
18
+
19
+ // Exit if accessed directly.
20
+ if ( ! defined( 'ABSPATH' ) ) {
21
+ exit;
22
+ }
23
+
24
+ /**
25
+ * Load module famne_user_email_changed
26
+ *
27
+ * @return void
28
+ */
29
+ function load_mod_famne_user_email_changed() {
30
+ $famne_options = FAMNE::get_option( 'famne_options' );
31
+
32
+ FAMNE::AddModule(
33
+ 'email_changed_email',
34
+ array(
35
+ 'name' => 'Add user e-mailaddress change notifier',
36
+ 'version' => '1.0.0',
37
+ 'option_id' => array( 'send_email_change_request_email_to_admin', 'send_email_changed_email_to_admin' ),
38
+ 'card' => 'card_famne_user_email_changed',
39
+ )
40
+ );
41
+
42
+ /**
43
+ * Card_famne_user_email_changed
44
+ *
45
+ * @param mixed $famne_options
46
+ * @return void
47
+ */
48
+ function card_famne_user_email_changed( $famne_options ) {
49
+ $active = ! empty( $famne_options['send_email_change_request_email_to_admin'] ) || ! empty( $famne_options['send_email_changed_email_to_admin'] );
50
+ ?>
51
+ <div class="card">
52
+ <label class="switch"><div class="slider round <?php echo ( $active ? 'active' : '' ); ?>"><span class="on">ON</span><span class="off">OFF</span></div></label>
53
+ <h2 class="title"><?php _e( 'E-mail address changed by user', 'manage-notification-emails' ); ?></h2>
54
+ <?php print_checkbox( $famne_options, 'send_email_change_request_email_to_admin', __( 'Request to change e-mailadress notification to admin', 'manage-notification-emails' ), __( 'Sends an e-mail to administrators after a user requested to update his or her e-mailaddress.', 'manage-notification-emails' ) ); ?>
55
+ <?php print_checkbox( $famne_options, 'send_email_changed_email_to_admin', __( 'User changed (confirmed) e-mail notification to admin', 'manage-notification-emails' ), __( 'Sends an e-mail to administrators after a user successfully updated his or her e-mailaddress.', 'manage-notification-emails' ) ); ?>
56
+ </div>
57
+ <?php
58
+ }
59
+
60
+ if ( ! empty( $famne_options['send_email_change_request_email_to_admin'] ) ) :
61
+
62
+ /**
63
+ * Famne_user_email_change_request_to_admin
64
+ *
65
+ * @return void
66
+ */
67
+ function famne_user_email_change_request_to_admin() {
68
+ // stop if email is not right.
69
+ $email = sanitize_email( $_POST['email'] );
70
+ if ( ! is_email( $email ) || email_exists( $email ) ) {
71
+ return;
72
+ }
73
+
74
+ $blog_name = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
75
+ $admin_email = get_option( 'admin_email' );
76
+
77
+ /* translators: Do not translate USERNAME, ADMIN_EMAIL, EMAIL, SITENAME, SITEURL: those are placeholders. */
78
+ $email_text = __(
79
+ 'Howdy admin,
80
+
81
+ Recently a user requested to have his email address on his account changed.
82
+
83
+ An email change request has been sent to ###EMAIL###
84
+
85
+ Regards,
86
+ All at ###SITENAME###
87
+ ###SITEURL###'
88
+ );
89
+
90
+ $email_text = str_replace( '###EMAIL###', $email, $email_text );
91
+ $email_text = str_replace( '###SITENAME###', $blog_name, $email_text );
92
+ $email_text = str_replace( '###SITEURL###', home_url(), $email_text );
93
+
94
+ wp_mail( $admin_email, sprintf( __( '[%s] User requested Email Change' ), $blog_name ), $email_text );
95
+ }
96
+ add_action( 'personal_options_update', 'famne_user_email_change_request_to_admin' );
97
+
98
+ endif;
99
+
100
+ if ( ! empty( $famne_options['send_email_changed_email_to_admin'] ) ) :
101
+ /**
102
+ * Famne_user_email_changed_email_to_admin
103
+ *
104
+ * @param array $email_change_email
105
+ * @param mixed $user
106
+ * @param mixed $userdata
107
+ * @return array $email_change_email
108
+ */
109
+ function famne_user_email_changed_email_to_admin( $email_change_email, $user, $userdata ) {
110
+ $blog_name = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
111
+ $admin_email = get_option( 'admin_email' );
112
+
113
+ /* translators: Do not translate USERNAME, ADMIN_EMAIL, NEW_EMAIL, EMAIL, SITENAME, SITEURL: those are placeholders. */
114
+ $email_text = __(
115
+ 'Hi admin,
116
+
117
+ This notice confirms that the user ###USERNAME### changed his email address on ###SITENAME### from ###EMAIL### to ###NEW_EMAIL###.
118
+
119
+ Regards,
120
+ All at ###SITENAME###
121
+ ###SITEURL###'
122
+ );
123
+
124
+ $email_text = str_replace( '###USERNAME###', $user['user_login'], $email_text );
125
+ $email_text = str_replace( '###NEW_EMAIL###', $userdata['user_email'], $email_text );
126
+ $email_text = str_replace( '###EMAIL###', $user['user_email'], $email_text );
127
+ $email_text = str_replace( '###SITENAME###', $blog_name, $email_text );
128
+ $email_text = str_replace( '###SITEURL###', home_url(), $email_text );
129
+
130
+ wp_mail( $admin_email, sprintf( __( '[%s] User Email Changed' ), $blog_name ), $email_text, $email_change_email['headers'] );
131
+
132
+ return $email_change_email;
133
+ }
134
+
135
+ add_filter( 'email_change_email', 'famne_user_email_changed_email_to_admin', 10, 3 );
136
+
137
+ endif;
138
+ }
139
+
140
+ add_action( 'fa_mne_modules', 'load_mod_famne_user_email_changed' );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: notification,notify,email,user,password,moderator,postauthor,automatic upd
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.7
7
- Stable tag: 1.6.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -35,10 +35,12 @@ Watch this nice tut made by Robert Orzanna:
35
  13. Send admin notifications to extra admin e-mailadresses *(1.7.0)*
36
  14. Send an e-mail to administrators after a user requested to update his or her e-mailaddress *(1.7.0)*
37
  15. Send an e-mail to administrators after a user successfully updated his or her e-mailaddress *(1.7.0)*
 
 
38
 
39
  The automatic core, plugin, and theme updates have a special built-in feature. When one of these options is disabled, successful e-mails don't get send out, but failed updates still will send an e-mail to the admin.
40
 
41
- If you allready want to use the new features, install the newest version 1.7.0.
42
 
43
  Want regular updates? Feel free to support me with a small donation :-)
44
 
@@ -47,7 +49,7 @@ Want regular updates? Feel free to support me with a small donation :-)
47
 
48
  1. Upload `manage-notification-emails.zip` via the plugins menu
49
  2. Activate the plugin through the 'Plugins' menu in WordPress
50
- 3. Use the settingspage to enable or disable sending of notifications
51
 
52
 
53
  == Frequently Asked Questions ==
@@ -56,20 +58,27 @@ Want regular updates? Feel free to support me with a small donation :-)
56
 
57
  Yes, after activating you can go to the settings page and disable or enable the notification e-mails that suits you.
58
 
59
- = Can I use this plugin for multisite? =
60
- This plugin is not tested on multisite environments yet.
61
 
62
  = Disabling user notifications does not work =
63
  Some other plugins also use their custom notifications which overwrite the core notifications of WordPress. To be sure, please first try the plugin without other plugins installed or at least temporarily disable them.
64
 
65
  == Screenshots ==
66
 
67
- 1. This is your view of the settingspage.
 
 
68
 
69
  == Upgrade Notice ==
70
  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.
71
 
72
  == Changelog ==
 
 
 
 
 
73
  = 1.7.1 =
74
  FIXED: Email automatic plugin update notification to admin sometimes still send out.
75
 
@@ -111,7 +120,7 @@ ADDED: Manage sending password forgot e-mail to administrator.
111
  = 1.1.0 =
112
  FIXED: Checking password change notification to admin now works.
113
  ADDED: Splitted the manage option for new user notification e-mail into user and admin e-mail.
114
- UPDATED: Clearified some comments and fixed some typo's.
115
 
116
  = 1.0 =
117
  * It all starts here.
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.7
7
+ Stable tag: 1.8.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
35
  13. Send admin notifications to extra admin e-mailadresses *(1.7.0)*
36
  14. Send an e-mail to administrators after a user requested to update his or her e-mailaddress *(1.7.0)*
37
  15. Send an e-mail to administrators after a user successfully updated his or her e-mailaddress *(1.7.0)*
38
+ 16. Multi-site support! Now you can manage your notification settings in one single environment *(1.8.0)*
39
+ 17. Export and import settings *(1.8.0)*
40
 
41
  The automatic core, plugin, and theme updates have a special built-in feature. When one of these options is disabled, successful e-mails don't get send out, but failed updates still will send an e-mail to the admin.
42
 
43
+ This version contains some nice new stuff. If you find any issues, let me know. If you like the new features, please be so kind to give this plugin a good rating! It will help me to keep up the good work for you :-)
44
 
45
  Want regular updates? Feel free to support me with a small donation :-)
46
 
49
 
50
  1. Upload `manage-notification-emails.zip` via the plugins menu
51
  2. Activate the plugin through the 'Plugins' menu in WordPress
52
+ 3. Use the settings-page to enable or disable sending of notifications
53
 
54
 
55
  == Frequently Asked Questions ==
58
 
59
  Yes, after activating you can go to the settings page and disable or enable the notification e-mails that suits you.
60
 
61
+ = Can I use this plugin for multi-site? =
62
+ Yes! starting from version 1.8.0 multi-site is supported.
63
 
64
  = Disabling user notifications does not work =
65
  Some other plugins also use their custom notifications which overwrite the core notifications of WordPress. To be sure, please first try the plugin without other plugins installed or at least temporarily disable them.
66
 
67
  == Screenshots ==
68
 
69
+ 1. Settings view: Core options.
70
+ 2. Settings view: Available modules.
71
+ 3. Settings view: Multi-site network settings.
72
 
73
  == Upgrade Notice ==
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.0 =
78
+ ADDED: Multi-site support.
79
+ ADDED: Import and export of settings.
80
+ UPDATED: A lot of files are refactored and added some more comments along with it.
81
+
82
  = 1.7.1 =
83
  FIXED: Email automatic plugin update notification to admin sometimes still send out.
84
 
120
  = 1.1.0 =
121
  FIXED: Checking password change notification to admin now works.
122
  ADDED: Splitted the manage option for new user notification e-mail into user and admin e-mail.
123
+ UPDATED: Clarified some comments and fixed some typo's.
124
 
125
  = 1.0 =
126
  * It all starts here.
screen-1.png DELETED
Binary file
screenshot-1.png ADDED
Binary file
screenshot-2.png ADDED
Binary file
screenshot-3.png ADDED
Binary file