WP_REST_Navigation_Fallback_Controller::prepare_links( WP_Post $post ): array

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Prepares the links for the request.

Parameters

$postWP_Postrequired
the Navigation Menu post object.

Return

array Links for the given request.

Source

private function prepare_links( $post ) {
	return array(
		'self' => array(
			'href'       => rest_url( rest_get_route_for_post( $post->ID ) ),
			'embeddable' => true,
		),
	);
}

Changelog

VersionDescription
6.3.0Introduced.

User Contributed Notes

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