WordPress.org

Make WordPress Core

Ticket #52013: 52013.3.patch

File 52013.3.patch, 2.1 KB (added by engahmeds3ed, 10 months ago)

add missing passed arguments and adjust action name

  • src/wp-admin/authorize-application.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    diff --git a/src/wp-admin/authorize-application.php b/src/wp-admin/authorize-application.php
    a b  
    200200
    201201                        <?php
    202202                        /**
    203                          * Fires in the Authorize Application Password new password section.
     203                         * Fires in the Authorize Application Password new password section in no-JS version.
    204204                         *
    205205                         * @since 5.6.0
    206206                         *
     
    208208                         * @param array   $request      The array of request data. All arguments are optional and may be empty.
    209209                         * @param WP_User $user         The user authorizing the application.
    210210                         */
    211                         do_action( 'wp_authorize_application_password_form', $request, $user );
     211                        do_action( 'wp_authorize_application_password_form_approved_no_js', $new_password, $request, $user );
    212212                        ?>
    213213                <?php else : ?>
    214214                        <form action="<?php echo esc_url( admin_url( 'authorize-application.php' ) ); ?>" method="post" class="form-wrap">
  • src/js/_enqueues/admin/auth-app.js

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    diff --git a/src/js/_enqueues/admin/auth-app.js b/src/js/_enqueues/admin/auth-app.js
    a b  
    132132                         * @param {string}      errorThrown The error message associated with the response status code.
    133133                         * @param {jqXHR}       jqXHR       The underlying jqXHR object that made the request.
    134134                         */
    135                         wp.hooks.doAction( 'wp_application_passwords_approve_app_request_success', error, textStatus, jqXHR );
     135                        wp.hooks.doAction( 'wp_application_passwords_approve_app_request_error', error, textStatus, errorThrown, jqXHR );
    136136                } );
    137137        } );
    138138