WordPress at a glance
function is not described

WP_REST_Application_Passwords_Controller::prepare_links() protected WP 5.6.0

Prepares links for the object.

{} It's a method of the class: WP_REST_Application_Passwords_Controller{}

No Hooks.

Return

Array. The list of links.

Usage

// protected - for code of main (parent) or child class
$result = $this->prepare_links( $user, $item );
$user(WP_User) (required)
The requested user.
$item(array) (required)
The application password.

Changelog

Since 5.6.0 Introduced.

Code of WP_REST_Application_Passwords_Controller::prepare_links() WP 5.6

<?php
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'] ) ),
		),
	);
}