Make WordPress Core

Ticket #54690: 54690.2.diff

File 54690.2.diff, 1.8 KB (added by costdev, 2 years ago)

Removes the no longer necessary $data variable from 54690.diff

  • src/wp-includes/user.php

    diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
    index 8d60d06619..4a22e5ca7f 100644
    a b function retrieve_password( $user_login = null ) { 
    30943094         *
    30953095         * @since 6.0.0
    30963096         *
    3097          * @param bool $send Whether to send the email.
     3097         * @param bool    $send       Whether to send the email.
     3098         * @param string  $user_login The username for the user.
     3099         * @param WP_User $user_data  WP_User object.
    30983100         */
    3099         if ( ! apply_filters( 'send_retrieve_password_email', true ) ) {
     3101        if ( ! apply_filters( 'send_retrieve_password_email', true, $user_login, $user_data ) ) {
    31003102                return true;
    31013103        }
    31023104
    function retrieve_password( $user_login = null ) { 
    31903192                'headers' => '',
    31913193        );
    31923194
    3193         $data = compact( 'key', 'user_login', 'user_data' );
    3194 
    31953195        /**
    31963196         * Filters the contents of the reset password notification email sent to the user.
    31973197         *
    function retrieve_password( $user_login = null ) { 
    32053205         *     @type string $message The body of the email.
    32063206         *     @type string $headers The headers of the email.
    32073207         * }
    3208          * @param array $data {
    3209          *     Additional information for extenders.
    3210          *
    3211          *     @type string  $key        The activation key.
    3212          *     @type string  $user_login The username for the user.
    3213          *     @type WP_User $user_data  WP_User object.
    3214          * }
     3208         * @type string  $key        The activation key.
     3209         * @type string  $user_login The username for the user.
     3210         * @type WP_User $user_data  WP_User object.
    32153211         */
    3216         $notification_email = apply_filters( 'retrieve_password_notification_email', $defaults, $data );
     3212        $notification_email = apply_filters( 'retrieve_password_notification_email', $defaults, $key, $user_login, $user_data );
    32173213
    32183214        if ( $switched_locale ) {
    32193215                restore_previous_locale();