Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('wp_new_user_notification_email', function ($mail) {
- preg_match_all('/(\?|\&)([^=]+)\=([^&]+)/', $mail['message'], $match);
- $new_link = '';
- foreach ($match[2] as $index => $value) {
- $new_link .= "{$value}={$match[3][$index]}&";
- }
- $new_link = "?{$new_link}";
- $new_link = network_site_url("my-account/lost-password" . substr($new_link, 0, -1));
- ob_start();
- ?>
- Reset your password with the link below
- <?= $new_link ?>
- <?php
- $mail['message'] = ob_get_clean();
- return $mail;
- });
Add Comment
Please, Sign In to add comment