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/wp-login.php
+++ b/wp-login.php
@@ -370,6 +370,16 @@ function retrieve_password() {
 	 * @param WP_User $user_data  WP_User object.
 	 */
 	$message = apply_filters( 'retrieve_password_message', $message, $key, $user_login, $user_data );
+        
+        /**
+	 * Fires before send email of retrieve password.
+	 *
+	 * @since 4.7.3
+	 *
+	 * @param string  $key        The activation key.
+	 * @param WP_User $user_data  WP_User object.
+	 */
+	do_action( 'before_send_mail_retrieve_password', $key, $user_data );
 
 	if ( $message && !wp_mail( $user_email, wp_specialchars_decode( $title ), $message ) )
 		wp_die( __('The email could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function.') );
