if ( is_email( $username ) ) { $error =
new WP_Error( 'invalid_email',
__( '<strong>Error:</strong> Unknown email address. Check again or try your username.'
) );
} else { $error =
new WP_Error( 'invalid_username',
__( '<strong>Error:</strong> Unknown username. Check again or try your email address.'
) );
} } elseif ( !
wp_is_application_passwords_available() ) { $error =
new WP_Error( 'application_passwords_disabled',
__( 'Application passwords are not available.'
) );
} elseif ( !
wp_is_application_passwords_available_for_user( $user ) ) { $error =
new WP_Error( 'application_passwords_disabled_for_user',
__( 'Application passwords are not available for your account. Please contact the site administrator for assistance.'
) );
}