mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 20:24:26 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@49920 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -200,15 +200,19 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Fires in the Authorize Application Password new password section.
|
||||
* Fires in the Authorize Application Password new password section in the no-JS version.
|
||||
*
|
||||
* In most cases, this should be used in combination with the {@see 'wp_application_passwords_approve_app_request_success'}
|
||||
* action to ensure that both the JS and no-JS variants are handled.
|
||||
*
|
||||
* @since 5.6.0
|
||||
* @since 5.6.1 Corrected action name and signature.
|
||||
*
|
||||
* @param string $new_password The newly generated application password.
|
||||
* @param array $request The array of request data. All arguments are optional and may be empty.
|
||||
* @param WP_User $user The user authorizing the application.
|
||||
*/
|
||||
do_action( 'wp_authorize_application_password_form', $request, $user );
|
||||
do_action( 'wp_authorize_application_password_form_approved_no_js', $new_password, $request, $user );
|
||||
?>
|
||||
<?php else : ?>
|
||||
<form action="<?php echo esc_url( admin_url( 'authorize-application.php' ) ); ?>" method="post" class="form-wrap">
|
||||
|
||||
Reference in New Issue
Block a user