From c0576b028401c22961af1b092a0cf3a797f6d97b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Anderson=20Gon=C3=A7alves?=
<anderson_rockandroll@hotmail.com>
Date: Sun, 26 Feb 2017 11:54:17 -0300
Subject: [PATCH] Do action before send email of retrieve password
---
wp-login.php | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/wp-login.php b/wp-login.php
index 03422b3..cc9b9c3 100644
a
|
b
|
function retrieve_password() { |
370 | 370 | * @param WP_User $user_data WP_User object. |
371 | 371 | */ |
372 | 372 | $message = apply_filters( 'retrieve_password_message', $message, $key, $user_login, $user_data ); |
| 373 | |
| 374 | /** |
| 375 | * Fires before send email of retrieve password. |
| 376 | * |
| 377 | * @since 4.7.3 |
| 378 | * |
| 379 | * @param string $key The activation key. |
| 380 | * @param WP_User $user_data WP_User object. |
| 381 | */ |
| 382 | do_action( 'before_send_mail_retrieve_password', $key, $user_data ); |
373 | 383 | |
374 | 384 | if ( $message && !wp_mail( $user_email, wp_specialchars_decode( $title ), $message ) ) |
375 | 385 | wp_die( __('The email could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function.') ); |