LLMS_REST_API_Keys_Controller::prepare_links( LLMS_REST_API_Key $item, WP_REST_Request $request )
Prepare a _links
object for an API Key.
Parameters Parameters
- $item
-
(LLMS_REST_API_Key) (Required) API Key object.
- $request
-
(WP_REST_Request) (Required) Request object.
Return Return
(array)
Source Source
File: libraries/lifterlms-rest/includes/server/class-llms-rest-api-keys-controller.php
$links = parent::prepare_links( $item, $request ); $links['user'] = array( 'href' => rest_url( sprintf( 'wp/v2/users/%d', $item->get( 'user_id' ) ) ), ); return $links; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.14 | Added $request parameter. |
1.0.0-beta.1 | Introduced. |