WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/21/2021 12:34:25 PM (11 months ago)
Author:
SergeyBiryukov
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 hooks were mistakenly duplicated and incorrectly documented. This commit corrects the hook names and ensures the correct parameters are passed.

Props johnbillion, engahmeds3ed.
Merges [49920] to the 5.6 branch.
Fixes #52013.

Location:
branches/5.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.6

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

    r49754 r49998  
    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.