函数原型
rest_application_password_collect_status( WP_Error $user_or_error, array $app_password = array() )
函数描述
Collects the status of authenticating with an application password.
是否弃用
未弃用
函数参数
-
$user_or_error
WP_Error
Required - The authenticated user or error instance.
-
$app_password
array
Optional - The Application Password used to authenticate.
Default:
array()
函数返回值
无
函数位置
File: wp-includes/rest-api.php.
函数源码
function rest_application_password_collect_status( $user_or_error, $app_password = array() ) {
global $wp_rest_application_password_status, $wp_rest_application_password_uuid;
$wp_rest_application_password_status = $user_or_error;
if ( empty( $app_password['uuid'] ) ) {
$wp_rest_application_password_uuid = null;
} else {
$wp_rest_application_password_uuid = $app_password['uuid'];
}
}
源码链接
变更日志
| Version | Description |
|---|---|
| 5.7.0 | Added the $app_password parameter. |
| 5.6.0 | Introduced. |

