-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathemail.php
More file actions
49 lines (34 loc) · 719 Bytes
/
email.php
File metadata and controls
49 lines (34 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
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
<?php
/**
* Disable all emails using wp_mail
*/
add_filter(
'wp_mail',
function ( $args ) {
unset( $args['to'] );
return $args;
},
10,
1
);
/**
* Disable sending password change emails
*/
add_filter( 'send_password_change_email', '__return_false' );
add_filter(
'wp_password_change_notification_email',
function ( $args ) {
unset( $args['to'] );
return $args;
}
);
/**
* Disable sending email change confirmation emails
*/
add_filter( 'send_email_change_email', '__return_false' );
/**
* Remove admin email verification screen
*
* @link https://developer.wordpress.org/reference/hooks/admin_email_check_interval/
*/
add_filter( 'admin_email_check_interval', '__return_false' );