Manage Notification E-mails - Version 1.4.2

Version Description

FIXED: Loading local language.

Download this release

Release Info

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

Code changes from version 1.5.1 to 1.4.2

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
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.5.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.5.1
7
  Author: Virgial Berveling
8
  Author URI: https://www.freeamigos.nl
9
  Text Domain: manage-notification-emails
@@ -59,7 +59,7 @@ License: GPLv2
59
 
60
  if (!defined('ABSPATH')) die();
61
 
62
- define( 'FA_MNE_VERSION', '1.5.1' );
63
  define( 'FA_MNE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
64
  define( 'FA_MNE_PLUGIN_DIR', untrailingslashit( dirname( __FILE__ ) ) );
65
 
@@ -70,12 +70,12 @@ define( 'FA_MNE_PLUGIN_DIR', untrailingslashit( dirname( __FILE__ ) ) );
70
  * @since 1.0.0
71
  */
72
 
73
- function fa_mne_init() {
74
-
75
  if (is_admin()) :
76
 
77
  include_once( FA_MNE_PLUGIN_DIR . '/includes/class.FAMNESettingsPage.php' );
78
- $fa_MNESettingsPage = new FAMNESettingsPage();
79
  endif;
80
  }
81
 
@@ -85,13 +85,11 @@ include_once( FA_MNE_PLUGIN_DIR . '/includes/class.FAMNESettingsPage.php' );
85
  * @since 1.3.0
86
  */
87
  global $wp_version;
88
- if (version_compare($wp_version, '5.2.0') >= 0) {
89
- include_once( FA_MNE_PLUGIN_DIR . '/includes/pluggable-functions-1.4.php' );
90
- }elseif (version_compare($wp_version, '4.7.0') >= 0) {
91
  include_once( FA_MNE_PLUGIN_DIR . '/includes/pluggable-functions-1.3.php' );
92
  }else {
93
  include_once( FA_MNE_PLUGIN_DIR . '/includes/pluggable-functions-1.2.php' );
94
  }
95
 
96
- fa_mne_init();
97
 
1
  <?php
2
  /*
3
  Plugin Name: Manage Notification E-mails
4
+ Plugin URI: https://www.freeamigos.nl/wp-plugins/manage-notification-emails/1.4.2
5
  Description: This plugin gives you the option to disable some of the notification e-mails send by Wordpress. It's a simple plugin but effective.
6
+ Version: 1.4.2
7
  Author: Virgial Berveling
8
  Author URI: https://www.freeamigos.nl
9
  Text Domain: manage-notification-emails
59
 
60
  if (!defined('ABSPATH')) die();
61
 
62
+ define( 'FA_MNE_VERSION', '1.4.2' );
63
  define( 'FA_MNE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
64
  define( 'FA_MNE_PLUGIN_DIR', untrailingslashit( dirname( __FILE__ ) ) );
65
 
70
  * @since 1.0.0
71
  */
72
 
73
+ function famne_init() {
74
+
75
  if (is_admin()) :
76
 
77
  include_once( FA_MNE_PLUGIN_DIR . '/includes/class.FAMNESettingsPage.php' );
78
+ $fa_MNESettingsPage = new FAMNESettingsPage();
79
  endif;
80
  }
81
 
85
  * @since 1.3.0
86
  */
87
  global $wp_version;
88
+ if (version_compare($wp_version, '4.7.0') >= 0) {
 
 
89
  include_once( FA_MNE_PLUGIN_DIR . '/includes/pluggable-functions-1.3.php' );
90
  }else {
91
  include_once( FA_MNE_PLUGIN_DIR . '/includes/pluggable-functions-1.2.php' );
92
  }
93
 
94
+ famne_init();
95
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: (Virgial)
3
  Tags: notification,notify,email,user,password,moderator,postauthor,admin,e-mail,switch
4
  Requires at least: 4.0.0
5
  Donate link:https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TYG56SLWNG42N
6
- Tested up to: 5.4.0
7
- Stable tag: 1.5.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -62,11 +62,6 @@ If you're one of the early installers, than you'll be happy to see that de new u
62
 
63
  == Changelog ==
64
 
65
- = 1.5.1 =
66
- FIXED: php-notice for missing $deprecated variable.
67
- = 1.5.0 =
68
- UPGRADED: Upgraded the pluggable functions file. Fixing the missing PassWordHash Class bug.
69
-
70
  = 1.4.2 =
71
  FIXED: Loading local language.
72
 
3
  Tags: notification,notify,email,user,password,moderator,postauthor,admin,e-mail,switch
4
  Requires at least: 4.0.0
5
  Donate link:https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TYG56SLWNG42N
6
+ Tested up to: 5.0.3
7
+ Stable tag: 1.4.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
62
 
63
  == Changelog ==
64
 
 
 
 
 
 
65
  = 1.4.2 =
66
  FIXED: Loading local language.
67
 
screen-1.png DELETED
Binary file