添加到您的函数中。php文件:
add_filter(\'wpmu_signup_user_notification\', \'my_if_notification_required\');
function my_if_notification_required( $user ){
$user = get_userdatabylogin( $user );
if( $user && in_array(\'editor\', $user->roles) ) return true;
else return false;
}
add_filter( \'wpmu_signup_user_notification_email\', \'my_notification_text\');
function my_notification_text( $user, $user_email, $key, $meta ){
$user = get_userdatabylogin( $user );
if( !$user || !in_array(\'editor\', $user->roles) ) return false;
$message = \'Your message\';
return $message;
}