Make WordPress Core


Ignore:
Timestamp:
01/16/2019 06:15:40 AM (6 years ago)
Author:
pento
Message:

Docs: Improve the sanitize_email filter.

  • Remove duplicate parameter names.
  • Fix the wrong value being passed in the second parameter.
  • Correct the type of the $message parameter.

Props ChriCo.
Fixes #45595.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r44618 r44620  
    34573457         * @since 2.8.0
    34583458         *
    3459          * @param string $email  The sanitized email address.
    3460          * @param string $email   The email address, as provided to sanitize_email().
    3461          * @param string $message A message to pass to the user.
     3459         * @param string $sanitized_email The sanitized email address.
     3460         * @param string $email           The email address, as provided to sanitize_email().
     3461         * @param string|null $message    A message to pass to the user. null if email is sanitized.
    34623462         */
    34633463        return apply_filters( 'sanitize_email', '', $email, 'email_too_short' );
     
    35323532
    35333533    // Put the email back together
    3534     $email = $local . '@' . $domain;
     3534    $sanitized_email = $local . '@' . $domain;
    35353535
    35363536    // Congratulations your email made it!
    35373537    /** This filter is documented in wp-includes/formatting.php */
    3538     return apply_filters( 'sanitize_email', $email, $email, null );
     3538    return apply_filters( 'sanitize_email', $sanitized_email, $email, null );
    35393539}
    35403540
Note: See TracChangeset for help on using the changeset viewer.