WP_REST_Application_Passwords_Controller::prepare_links( WP_User $user, array $item )
Prepares links for the request.
Parameters
- $user
-
(WP_User) (Required) The requested user.
- $item
-
(array) (Required) The application password.
Return
(array) The list of links.
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.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'] ) ), ), ); }
Changelog
Version | Description |
---|---|
5.6.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_application_passwords_controller/prepare_links