Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: user_request_action_email_headers

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
4531       *
4532       *     @type WP_User_Request $request     User request object.
4533       *     @type string          $email       The email address this is being sent to.
4534       *     @type string          $description Description of the action being performed so the user knows what the email is for.
4535       *     @type string          $confirm_url The link to click on to confirm the account action.
4536       *     @type string          $sitename    The site name sending the mail.
4537       *     @type string          $siteurl     The site URL sending the mail.
4538       * }
4539       */
4540      $headers = apply_filters( 'user_request_action_email_headers', $headers, $subject, $content, $request_id, $email_data );
4541
4542      $email_sent = wp_mail( $email_data['email'], $subject, $content, $headers );
4543
4544      if ( $switched_locale ) {
4545           restore_previous_locale();
4546      }
4547
4548      if ( ! $email_sent ) {
4549           return new WP_Error( 'privacy_email_error', __( 'Unable to send personal data export confirmation email.' ) );