rest_application_password_collect_status

The timeline below displays how wordpress function rest_application_password_collect_status has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.7

/**
 * Collects the status of authenticating with an application password.
 *
 * @since 5.6.0
 * @since 5.7.0 Added the `$app_password` parameter.
 *
 * @global WP_User|WP_Error|null $wp_rest_application_password_status
 * @global string|null $wp_rest_application_password_uuid
 *
 * @param WP_Error $user_or_error The authenticated user or error instance.
 * @param array    $app_password  The Application Password used to authenticate.
 */
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'];
    }
}

WordPress Version: 5.6

/**
 * Collects the status of authenticating with an application password.
 *
 * @since 5.6.0
 *
 * @global WP_User|WP_Error|null $wp_rest_application_password_status
 *
 * @param WP_Error $user_or_error The authenticated user or error instance.
 */
function rest_application_password_collect_status($user_or_error)
{
    global $wp_rest_application_password_status;
    $wp_rest_application_password_status = $user_or_error;
}