wp_authorize_application_password_form
云策文档标注
概述
wp_authorize_application_password_form 是一个 WordPress 动作钩子,在授权应用密码表单的提交按钮前触发,用于处理表单数据。
关键要点
- 触发时机:在 Authorize Application Password 表单的提交按钮之前执行。
- 参数:接受 $request(包含 app_name、success_url、reject_url 等可选数据的数组)和 $user(授权应用的 WP_User 对象)。
- 用途:允许开发者在用户授权应用密码时自定义表单处理逻辑。
- 版本:自 WordPress 5.6.0 引入。
原文内容
Fires in the Authorize Application Password form before the submit buttons.
Parameters
$requestarray-
The array of request data. All arguments are optional and may be empty.
app_namestringThe suggested name of the application.success_urlstringThe URL the user will be redirected to after approving the application.reject_urlstringThe URL the user will be redirected to after rejecting the application.
$userWP_User-
The user authorizing the application.
Source
do_action( 'wp_authorize_application_password_form', $request, $user );
Changelog
| Version | Description |
|---|---|
| 5.6.0 | Introduced. |