Opened 4 years ago
Closed 4 years ago
#52013 closed defect (bug) (fixed)
Duplicate wp_authorize_application_password_form actions
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.6.1 | Priority: | normal |
Severity: | normal | Version: | 5.6 |
Component: | Application Passwords | Keywords: | good-first-bug has-patch fixed-major |
Focuses: | docs | Cc: |
Description
There are two instances of the wp_authorize_application_password_form
actions, but both are documented with different documentation and an apparent different use case. The documented parameters for the first instance are incorrect.
The first fires in the Authorize Application Password new password section, and the second fires in the Authorize Application Password form before the submit buttons.
It looks to me like the first action should be renamed as it does not fire within the password form, it fires when showing the user their new password.
Refs:
Attachments (2)
Change History (10)
@
4 years ago
update wp_application_passwords_approve_app_request_success TO wp_application_passwords_approve_app_request_error and rename wp_authorize_application_password_form action to be wp_authorize_application_password_form_no_js
#2
@
4 years ago
Thanks for the patch @engahmeds3ed!
Let's include in wp_authorize_application_password_form_no_js
that this is the success variant, so wp_authorize_application_password_form_approved_no_js
.
We also need to pass the $new_password
to the no js hook, and the errorThrown
var to the JS hook.
#6
@
4 years ago
- Owner set to TimothyBlynJacobs
- Resolution set to fixed
- Status changed from reviewing to closed
In 49920:
Yeah, not sure how I ended up doing that. There is another instance in
auth-app.js
where the secondwp_application_passwords_approve_app_request_success
should actually bewp_application_passwords_approve_app_request_error
.For clarity, the first PHP action will only end up firing in the no-JS version of that page. Maybe we should include that in the action name so developers aren't confused when they don't see hooks added to it working.