LLMS_REST_Students_Controller::prepare_links( obj $object, WP_REST_Request $request )

Prepare links for the request.

Parameters Parameters


(obj) (Required) Item object.


(WP_REST_Request) (Required) Request object.

Top ↑

Return Return


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/server/class-llms-rest-students-controller.php

	protected function prepare_links( $object, $request ) {

		$links = parent::prepare_links( $object, $request );

		$links['enrollments'] = array(
			'href' => sprintf( '%s/enrollments', $links['self']['href'] ),
		$links['progress']    = array(
			'href' => sprintf( '%s/progress', $links['self']['href'] ),

		return $links;


Top ↑

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.