rest_application_password_collect_status()
Collects the status of authenticating with an application password.
No Hooks.
Return
null
. Nothing (null).
Usage
rest_application_password_collect_status( $user_or_error, $app_password );
- $user_or_error(WP_Error) (required)
- The authenticated user or error instance.
- $app_password(array)
- The Application Password used to authenticate.
Default: array()
Notes
- Global. WP_User|WP_Error|null. $wp_rest_application_password_status
- Global. String|null. $wp_rest_application_password_uuid
Changelog
Since 5.6.0 | Introduced. |
Since 5.7.0 | Added the $app_password parameter. |
rest_application_password_collect_status() rest application password collect status code WP 6.7.1
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']; } }