BP_REST_Mention_Endpoint::prepare_links( object $user )

Prepares links for the user request.

Description

Parameters

$user

(Required) User object.

Return

(array) Links for the given user.

Source

File: bp-core/classes/class-bp-rest-mention-endpoint.php

	protected function prepare_links( $user ) {
		$links = array(
			'self' => array(
				'href' => rest_url( sprintf( '%s/%s/%d', $this->namespace, 'members', $user->user_id ) ),
			),
		);

		return $links;
	}

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.