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.


Array. The list of links.


// 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.


Since 5.6.0 Introduced.

Code of WP_REST_Application_Passwords_Controller::prepare_links() WP 5.7.2

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'] ) ),