Version Description
UPGRADED: Upgraded the pluggable functions file. Fixing the missing PassWordHash Class bug.
Download this release
Release Info
Developer | Virgial |
Plugin | Manage Notification E-mails |
Version | 1.5.0 |
Comparing to | |
See all releases |
Code changes from version 1.4.1 to 1.5.0
- includes/class.FAMNESettingsPage.php +20 -1
- includes/pluggable-functions-1.4.php +330 -0
- manage-notification-emails.php +48 -58
- readme.txt +10 -3
includes/class.FAMNESettingsPage.php
CHANGED
@@ -31,7 +31,8 @@ class FAMNESettingsPage
|
|
31 |
add_action( 'plugins_loaded', array($this, 'update_check') );
|
32 |
add_action( 'admin_menu', array( $this, 'add_plugin_page' ) );
|
33 |
add_action( 'admin_init', array( $this, 'page_init' ) );
|
34 |
-
|
|
|
35 |
}
|
36 |
|
37 |
/**
|
@@ -342,4 +343,22 @@ class FAMNESettingsPage
|
|
342 |
update_site_option('fa_mne_version',FA_MNE_VERSION);
|
343 |
}
|
344 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
345 |
}
|
31 |
add_action( 'plugins_loaded', array($this, 'update_check') );
|
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 |
/**
|
343 |
update_site_option('fa_mne_version',FA_MNE_VERSION);
|
344 |
}
|
345 |
}
|
346 |
+
|
347 |
+
function add_action_links ( $links ) {
|
348 |
+
$mylinks = array(
|
349 |
+
'<a href="' . admin_url( 'options-general.php?page=famne-admin' ) . '">'.__('Settings').'</a>',
|
350 |
+
);
|
351 |
+
return array_merge( $links, $mylinks );
|
352 |
+
}
|
353 |
+
|
354 |
+
/**
|
355 |
+
* Translations.
|
356 |
+
*
|
357 |
+
* @since 1.4.2
|
358 |
+
*/
|
359 |
+
function famne_load_textdomain() {
|
360 |
+
load_plugin_textdomain( 'manage-notification-emails', false, basename(FA_MNE_PLUGIN_DIR) . '/languages' );
|
361 |
+
}
|
362 |
+
|
363 |
+
|
364 |
}
|
includes/pluggable-functions-1.4.php
ADDED
@@ -0,0 +1,330 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
|
4 |
+
STOP SENDING NOTIFICATION MAILS TO THE USERS
|
5 |
+
version: 1.5.0
|
6 |
+
updated: the core pluggable function wp_new_user_notification
|
7 |
+
added: passing through the $deprecated and $notify
|
8 |
+
|
9 |
+
1.2.0 initial
|
10 |
+
*/
|
11 |
+
|
12 |
+
if (!defined('ABSPATH')) die();
|
13 |
+
|
14 |
+
$famne_options = get_option( 'famne_options' );
|
15 |
+
|
16 |
+
if (!function_exists('dont_send_password_change_email') ) :
|
17 |
+
/**
|
18 |
+
* Email password change notification to registered user.
|
19 |
+
*
|
20 |
+
*/
|
21 |
+
//echo "dont_send_password_change_email";
|
22 |
+
function dont_send_password_change_email( $send=false, $user='', $userdata='')
|
23 |
+
{
|
24 |
+
|
25 |
+
global $famne_options;
|
26 |
+
|
27 |
+
if (is_array($user)) $user = (object) $user;
|
28 |
+
|
29 |
+
if (!empty($famne_options['wp_password_change_notification']) ) :
|
30 |
+
|
31 |
+
// send a copy of password change notification to the admin
|
32 |
+
// but check to see if it's the admin whose password we're changing, and skip this
|
33 |
+
if ( 0 !== strcasecmp( $user->user_email, get_option( 'admin_email' ) ) ) {
|
34 |
+
$message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n";
|
35 |
+
// The blogname option is escaped with esc_html on the way into the database in sanitize_option
|
36 |
+
// we want to reverse this for the plain text arena of emails.
|
37 |
+
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
|
38 |
+
wp_mail(get_option('admin_email'), sprintf(__('[%s] Password Lost/Changed'), $blogname), $message);
|
39 |
+
}
|
40 |
+
|
41 |
+
endif;
|
42 |
+
|
43 |
+
if (empty($famne_options['send_password_change_email']) ) :
|
44 |
+
return false;
|
45 |
+
else :
|
46 |
+
return true;
|
47 |
+
endif;
|
48 |
+
}
|
49 |
+
add_filter('send_password_change_email', 'dont_send_password_change_email',1,3);
|
50 |
+
endif;
|
51 |
+
|
52 |
+
|
53 |
+
if (empty($famne_options['send_email_change_email']) && !function_exists('dont_send_email_change_email') ) :
|
54 |
+
/**
|
55 |
+
* Email users e-mail change notification to registered user.
|
56 |
+
*
|
57 |
+
*/
|
58 |
+
//echo "dont_send_email_change_email off";
|
59 |
+
function dont_send_email_change_email( $send=false, $user='', $userdata='')
|
60 |
+
{
|
61 |
+
return false;
|
62 |
+
}
|
63 |
+
add_filter('send_email_change_email', 'dont_send_email_change_email',1,3);
|
64 |
+
endif;
|
65 |
+
|
66 |
+
|
67 |
+
|
68 |
+
if (!function_exists('wp_new_user_notification') ) :
|
69 |
+
/**
|
70 |
+
* Email login credentials to a newly-registered user.
|
71 |
+
*
|
72 |
+
* A new user registration notification is also sent to admin email.
|
73 |
+
*/
|
74 |
+
//echo "wp_new_user_notification off";
|
75 |
+
function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' ) {
|
76 |
+
|
77 |
+
global $famne_options;
|
78 |
+
|
79 |
+
if (!empty($famne_options['wp_new_user_notification_to_admin']))
|
80 |
+
{
|
81 |
+
fa_new_user_notification_to_admin($user_id,$notify);
|
82 |
+
}
|
83 |
+
|
84 |
+
if (!empty($famne_options['wp_new_user_notification_to_user']))
|
85 |
+
{
|
86 |
+
fa_new_user_notification_to_user($user_id,$deprecated,$notify);
|
87 |
+
}
|
88 |
+
}
|
89 |
+
endif;
|
90 |
+
|
91 |
+
if (empty($famne_options['wp_notify_postauthor']) && !function_exists('wp_notify_postauthor') ) :
|
92 |
+
/**
|
93 |
+
* Notify an author (and/or others) of a comment/trackback/pingback on a post.
|
94 |
+
*/
|
95 |
+
//echo "wp_notify_postauthor off";
|
96 |
+
function wp_notify_postauthor( $comment_id, $deprecated = null ) {}
|
97 |
+
endif;
|
98 |
+
|
99 |
+
if (empty($famne_options['wp_notify_moderator']) && !function_exists('wp_notify_moderator') ) :
|
100 |
+
/**
|
101 |
+
* Notifies the moderator of the blog about a new comment that is awaiting approval.
|
102 |
+
*/
|
103 |
+
//echo "wp_notify_moderator off";
|
104 |
+
function wp_notify_moderator($comment_id) {}
|
105 |
+
endif;
|
106 |
+
|
107 |
+
|
108 |
+
|
109 |
+
|
110 |
+
if (empty($famne_options['wp_password_change_notification']) && !function_exists('wp_password_change_notification') ) :
|
111 |
+
/**
|
112 |
+
* Notify the blog admin of a user changing password, normally via email.
|
113 |
+
*/
|
114 |
+
function wp_password_change_notification($user) {}
|
115 |
+
|
116 |
+
|
117 |
+
endif;
|
118 |
+
|
119 |
+
|
120 |
+
|
121 |
+
if ((empty($famne_options['send_password_forgotten_email']) || empty($famne_options['send_password_admin_forgotten_email'])) && !function_exists('dont_send_password_forgotten_email') ) :
|
122 |
+
/**
|
123 |
+
* Email forgotten password notification to registered user.
|
124 |
+
*
|
125 |
+
*/
|
126 |
+
//echo "dont_send_password_forgotten_email off";exit;
|
127 |
+
function dont_send_password_forgotten_email( $send=true, $user_id=0 )
|
128 |
+
{
|
129 |
+
global $famne_options;
|
130 |
+
|
131 |
+
$is_administrator = fa_user_is_administrator($user_id);
|
132 |
+
|
133 |
+
if ($is_administrator && empty($famne_options['send_password_admin_forgotten_email']))
|
134 |
+
{
|
135 |
+
// stop sending admin forgot email
|
136 |
+
return false;
|
137 |
+
}
|
138 |
+
if (!$is_administrator && empty($famne_options['send_password_forgotten_email']))
|
139 |
+
{
|
140 |
+
// stop sending user forgot email
|
141 |
+
return false;
|
142 |
+
}
|
143 |
+
// none of the above so give the default status back
|
144 |
+
return $send;
|
145 |
+
}
|
146 |
+
add_filter('allow_password_reset', 'dont_send_password_forgotten_email',1,3);
|
147 |
+
endif;
|
148 |
+
|
149 |
+
|
150 |
+
|
151 |
+
|
152 |
+
if (empty($famne_options['auto_core_update_send_email']) && !function_exists('fa_dont_sent_auto_core_update_emails') ) :
|
153 |
+
/**
|
154 |
+
* Send email when wordpress automatic updated.
|
155 |
+
*
|
156 |
+
*/
|
157 |
+
//echo "auto_core_update_send_email off";exit;
|
158 |
+
|
159 |
+
|
160 |
+
function fa_dont_sent_auto_core_update_emails( $send, $type, $core_update, $result ) {
|
161 |
+
if ( ! empty( $type ) && $type == 'success' ) {
|
162 |
+
return false;
|
163 |
+
}
|
164 |
+
return true;
|
165 |
+
}
|
166 |
+
add_filter( 'auto_core_update_send_email', 'fa_dont_sent_auto_core_update_emails', 10, 4 );
|
167 |
+
endif;
|
168 |
+
|
169 |
+
|
170 |
+
|
171 |
+
function fa_new_user_notification_to_admin ($user_id,$notify='')
|
172 |
+
{
|
173 |
+
|
174 |
+
//Most parts of this function are copied form pluggable.php
|
175 |
+
|
176 |
+
if ( $deprecated !== null ) {
|
177 |
+
_deprecated_argument( __FUNCTION__, '4.3.1' );
|
178 |
+
}
|
179 |
+
|
180 |
+
global $wpdb, $wp_hasher;
|
181 |
+
$user = get_userdata( $user_id );
|
182 |
+
|
183 |
+
// The blogname option is escaped with esc_html on the way into the database in sanitize_option
|
184 |
+
// we want to reverse this for the plain text arena of emails.
|
185 |
+
$blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
|
186 |
+
|
187 |
+
if ( 'user' !== $notify ) {
|
188 |
+
$switched_locale = switch_to_locale( get_locale() );
|
189 |
+
|
190 |
+
/* translators: %s: site title */
|
191 |
+
$message = sprintf( __( 'New user registration on your site %s:' ), $blogname ) . "\r\n\r\n";
|
192 |
+
/* translators: %s: user login */
|
193 |
+
$message .= sprintf( __( 'Username: %s' ), $user->user_login ) . "\r\n\r\n";
|
194 |
+
/* translators: %s: user email address */
|
195 |
+
$message .= sprintf( __( 'Email: %s' ), $user->user_email ) . "\r\n";
|
196 |
+
|
197 |
+
$wp_new_user_notification_email_admin = array(
|
198 |
+
'to' => get_option( 'admin_email' ),
|
199 |
+
/* translators: New user registration notification email subject. %s: Site title */
|
200 |
+
'subject' => __( '[%s] New User Registration' ),
|
201 |
+
'message' => $message,
|
202 |
+
'headers' => '',
|
203 |
+
);
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Filters the contents of the new user notification email sent to the site admin.
|
207 |
+
*
|
208 |
+
* @since 4.9.0
|
209 |
+
*
|
210 |
+
* @param array $wp_new_user_notification_email {
|
211 |
+
* Used to build wp_mail().
|
212 |
+
*
|
213 |
+
* @type string $to The intended recipient - site admin email address.
|
214 |
+
* @type string $subject The subject of the email.
|
215 |
+
* @type string $message The body of the email.
|
216 |
+
* @type string $headers The headers of the email.
|
217 |
+
* }
|
218 |
+
* @param WP_User $user User object for new user.
|
219 |
+
* @param string $blogname The site title.
|
220 |
+
*/
|
221 |
+
$wp_new_user_notification_email_admin = apply_filters( 'wp_new_user_notification_email_admin', $wp_new_user_notification_email_admin, $user, $blogname );
|
222 |
+
|
223 |
+
@wp_mail(
|
224 |
+
$wp_new_user_notification_email_admin['to'],
|
225 |
+
wp_specialchars_decode( sprintf( $wp_new_user_notification_email_admin['subject'], $blogname ) ),
|
226 |
+
$wp_new_user_notification_email_admin['message'],
|
227 |
+
$wp_new_user_notification_email_admin['headers']
|
228 |
+
);
|
229 |
+
|
230 |
+
if ( $switched_locale ) {
|
231 |
+
restore_previous_locale();
|
232 |
+
}
|
233 |
+
}
|
234 |
+
}
|
235 |
+
|
236 |
+
|
237 |
+
function fa_new_user_notification_to_user($user_id,$deprecated=null,$notify='')
|
238 |
+
{
|
239 |
+
if ( $deprecated !== null ) {
|
240 |
+
_deprecated_argument( __FUNCTION__, '4.3.1' );
|
241 |
+
}
|
242 |
+
|
243 |
+
// Accepts only 'user', 'admin' , 'both' or default '' as $notify
|
244 |
+
if ( ! in_array( $notify, array( 'user', 'admin', 'both', '' ), true ) ) {
|
245 |
+
return;
|
246 |
+
}
|
247 |
+
|
248 |
+
global $wpdb, $wp_hasher;
|
249 |
+
$user = get_userdata( $user_id );
|
250 |
+
|
251 |
+
// The blogname option is escaped with esc_html on the way into the database in sanitize_option
|
252 |
+
// we want to reverse this for the plain text arena of emails.
|
253 |
+
$blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
|
254 |
+
|
255 |
+
// `$deprecated was pre-4.3 `$plaintext_pass`. An empty `$plaintext_pass` didn't sent a user notification.
|
256 |
+
if ( 'admin' === $notify || ( empty( $deprecated ) && empty( $notify ) ) ) {
|
257 |
+
return;
|
258 |
+
}
|
259 |
+
|
260 |
+
// Generate something random for a password reset key.
|
261 |
+
$key = wp_generate_password( 20, false );
|
262 |
+
|
263 |
+
/** This action is documented in wp-login.php */
|
264 |
+
do_action( 'retrieve_password_key', $user->user_login, $key );
|
265 |
+
|
266 |
+
// Now insert the key, hashed, into the DB.
|
267 |
+
if ( empty( $wp_hasher ) ) {
|
268 |
+
require_once ABSPATH . WPINC . '/class-phpass.php';
|
269 |
+
$wp_hasher = new PasswordHash( 8, true );
|
270 |
+
}
|
271 |
+
$hashed = time() . ':' . $wp_hasher->HashPassword( $key );
|
272 |
+
$wpdb->update( $wpdb->users, array( 'user_activation_key' => $hashed ), array( 'user_login' => $user->user_login ) );
|
273 |
+
|
274 |
+
$switched_locale = switch_to_locale( get_user_locale( $user ) );
|
275 |
+
|
276 |
+
/* translators: %s: user login */
|
277 |
+
$message = sprintf( __( 'Username: %s' ), $user->user_login ) . "\r\n\r\n";
|
278 |
+
$message .= __( 'To set your password, visit the following address:' ) . "\r\n\r\n";
|
279 |
+
$message .= '<' . network_site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user->user_login ), 'login' ) . ">\r\n\r\n";
|
280 |
+
|
281 |
+
$message .= wp_login_url() . "\r\n";
|
282 |
+
|
283 |
+
$wp_new_user_notification_email = array(
|
284 |
+
'to' => $user->user_email,
|
285 |
+
/* translators: Login details notification email subject. %s: Site title */
|
286 |
+
'subject' => __( '[%s] Login Details' ),
|
287 |
+
'message' => $message,
|
288 |
+
'headers' => '',
|
289 |
+
);
|
290 |
+
|
291 |
+
/**
|
292 |
+
* Filters the contents of the new user notification email sent to the new user.
|
293 |
+
*
|
294 |
+
* @since 4.9.0
|
295 |
+
*
|
296 |
+
* @param array $wp_new_user_notification_email {
|
297 |
+
* Used to build wp_mail().
|
298 |
+
*
|
299 |
+
* @type string $to The intended recipient - New user email address.
|
300 |
+
* @type string $subject The subject of the email.
|
301 |
+
* @type string $message The body of the email.
|
302 |
+
* @type string $headers The headers of the email.
|
303 |
+
* }
|
304 |
+
* @param WP_User $user User object for new user.
|
305 |
+
* @param string $blogname The site title.
|
306 |
+
*/
|
307 |
+
$wp_new_user_notification_email = apply_filters( 'wp_new_user_notification_email', $wp_new_user_notification_email, $user, $blogname );
|
308 |
+
|
309 |
+
wp_mail(
|
310 |
+
$wp_new_user_notification_email['to'],
|
311 |
+
wp_specialchars_decode( sprintf( $wp_new_user_notification_email['subject'], $blogname ) ),
|
312 |
+
$wp_new_user_notification_email['message'],
|
313 |
+
$wp_new_user_notification_email['headers']
|
314 |
+
);
|
315 |
+
|
316 |
+
if ( $switched_locale ) {
|
317 |
+
restore_previous_locale();
|
318 |
+
}
|
319 |
+
}
|
320 |
+
|
321 |
+
function fa_user_is_administrator($user_id=0)
|
322 |
+
{
|
323 |
+
$user = new WP_User( intval($user_id) );
|
324 |
+
$is_administrator = false;
|
325 |
+
if ( !empty( $user->roles ) && is_array( $user->roles ) ) {
|
326 |
+
foreach ( $user->roles as $role )
|
327 |
+
if ( strtolower($role) == 'administrator') $is_administrator = true;
|
328 |
+
}
|
329 |
+
return $is_administrator;
|
330 |
+
}
|
manage-notification-emails.php
CHANGED
@@ -1,65 +1,65 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Manage Notification E-mails
|
4 |
-
Plugin URI: https://www.freeamigos.nl/wp-plugins/manage-notification-emails/1.4.
|
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.
|
7 |
Author: Virgial Berveling
|
8 |
Author URI: https://www.freeamigos.nl
|
9 |
Text Domain: manage-notification-emails
|
10 |
Domain Path: /languages/
|
11 |
-
License:
|
12 |
*/
|
13 |
|
14 |
|
15 |
-
/*
|
16 |
-
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
|
31 |
-
|
32 |
-
|
33 |
*/
|
34 |
|
35 |
|
36 |
/*
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
*/
|
59 |
|
60 |
if (!defined('ABSPATH')) die();
|
61 |
|
62 |
-
define( 'FA_MNE_VERSION', '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
|
74 |
-
|
75 |
if (is_admin()) :
|
76 |
-
|
77 |
-
|
78 |
-
$fa_MNESettingsPage = new FAMNESettingsPage();
|
79 |
endif;
|
80 |
}
|
81 |
|
@@ -85,23 +85,13 @@ function famne_init() {
|
|
85 |
* @since 1.3.0
|
86 |
*/
|
87 |
global $wp_version;
|
88 |
-
if (version_compare($wp_version, '
|
|
|
|
|
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 |
-
|
95 |
-
* Translations.
|
96 |
-
*
|
97 |
-
* @since 1.4.0
|
98 |
-
*/
|
99 |
-
add_action('plugins_loaded', 'famne_load_textdomain');
|
100 |
-
if ( ! function_exists( 'famne_load_textdomain' ) ) {
|
101 |
-
function famne_load_textdomain() {
|
102 |
-
load_plugin_textdomain( 'manage-notification-emails', false, FA_MNE_PLUGIN_DIR . '/languages/' );
|
103 |
-
}
|
104 |
-
}
|
105 |
-
|
106 |
-
famne_init();
|
107 |
|
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.5.0
|
7 |
Author: Virgial Berveling
|
8 |
Author URI: https://www.freeamigos.nl
|
9 |
Text Domain: manage-notification-emails
|
10 |
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.5.0' );
|
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 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 |
* @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 |
|
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.
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -14,7 +14,8 @@ Disable or enable the Wordpress notification e-mails (new user, changed password
|
|
14 |
|
15 |
With this plugin you can switch the different Wordpress notification e-mails on and off, like options as the new user and password change notifications send by Wordpress to the administrator and user. Works perfectly in combination with a lot of other plugins!
|
16 |
|
17 |
-
Watch this nice tut made by Robert Orzanna:
|
|
|
18 |
|
19 |
|
20 |
**The options you can manage are:**
|
@@ -61,6 +62,12 @@ If you're one of the early installers, than you'll be happy to see that de new u
|
|
61 |
|
62 |
== Changelog ==
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
= 1.4.1 =
|
65 |
ADDED: Manage sending e-mail after a successful automatic Wordpress core update to administrators. E-mails about failed updates will always be sent to the administrators and will not be disabled.
|
66 |
|
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.3.2
|
7 |
+
Stable tag: 1.5.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
14 |
|
15 |
With this plugin you can switch the different Wordpress notification e-mails on and off, like options as the new user and password change notifications send by Wordpress to the administrator and user. Works perfectly in combination with a lot of other plugins!
|
16 |
|
17 |
+
Watch this nice tut made by Robert Orzanna:
|
18 |
+
[youtube https://www.youtube.com/watch?v=66UkQKgSFio]
|
19 |
|
20 |
|
21 |
**The options you can manage are:**
|
62 |
|
63 |
== Changelog ==
|
64 |
|
65 |
+
= 1.5.0 =
|
66 |
+
UPGRADED: Upgraded the pluggable functions file. Fixing the missing PassWordHash Class bug.
|
67 |
+
|
68 |
+
= 1.4.2 =
|
69 |
+
FIXED: Loading local language.
|
70 |
+
|
71 |
= 1.4.1 =
|
72 |
ADDED: Manage sending e-mail after a successful automatic Wordpress core update to administrators. E-mails about failed updates will always be sent to the administrators and will not be disabled.
|
73 |
|