rest_application_password_collect_status() WordPress Function

The rest_application_password_collect_status() function is used to gather the status of a user's application passwords. This is useful for determining if a user is still using an app that requires an application password.

rest_application_password_collect_status( WP_Error $user_or_error, array $app_password = array() ) #

Collects the status of authenticating with an application password.


Parameters

$user_or_error

(WP_Error)(Required)The authenticated user or error instance.

$app_password

(array)(Optional)The Application Password used to authenticate.

Default value: array()


Top ↑

Source

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'];
	}
}

Top ↑

Changelog

Changelog
VersionDescription
5.7.0Added the $app_password parameter.
5.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More