Make WordPress Core


Ignore:
Timestamp:
01/02/2021 10:19:21 PM (3 years ago)
Author:
TimothyBlynJacobs
Message:

App Passwords: Correct authorize app action names and signatures.

When App Passwords was introduced, the wp_authorize_application_password_form and wp_application_passwords_approve_app_request_success hook were mistakenly duplicated and incorrectly documented. This commit corrects the hook names and ensures the correct parameters are passed.

Props johnbillion, engahmeds3ed.
Fixes #52013.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/authorize-application.php

    r49752 r49920  
    201201            <?php
    202202            /**
    203              * Fires in the Authorize Application Password new password section.
     203             * Fires in the Authorize Application Password new password section in the no-JS version.
     204             *
     205             * In most cases, this should be used in combination with the {@see 'wp_application_passwords_approve_app_request_success'}
     206             * action to ensure that both the JS and no-JS variants are handled.
    204207             *
    205208             * @since 5.6.0
     209             * @since 5.6.1 Corrected action name and signature.
    206210             *
    207211             * @param string  $new_password The newly generated application password.
     
    209213             * @param WP_User $user         The user authorizing the application.
    210214             */
    211             do_action( 'wp_authorize_application_password_form', $request, $user );
     215            do_action( 'wp_authorize_application_password_form_approved_no_js', $new_password, $request, $user );
    212216            ?>
    213217        <?php else : ?>
Note: See TracChangeset for help on using the changeset viewer.