WP_REST_Application_Passwords_Controller::prepare_links( WP_User $user, array $item ): array

In this article

Prepares links for the request.

Parameters

$userWP_Userrequired
The requested user.
$itemarrayrequired
The application password.

Return

array The list of links.

Source

protected function prepare_links( WP_User $user, $item ) {
	return array(
		'self' => array(
			'href' => rest_url(
				sprintf(
					'%s/users/%d/application-passwords/%s',
					$this->namespace,
					$user->ID,
					$item['uuid']
				)
			),
		),
	);
}

Changelog

VersionDescription
5.6.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.