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.


Top ↑

Return Return

(array)


Top ↑

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;

	}



Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0-beta.14 Added $request parameter.
1.0.0-beta.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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