WP_REST_Font_Families_Controller::prepare_links()protectedWP 6.5.0

Prepares font family links for the request.

Method of the class: WP_REST_Font_Families_Controller{}

No Hooks.

Return

Array. Links for the given post.

Usage

// protected - for code of main (parent) or child class
$result = $this->prepare_links( $post );
$post(WP_Post) (required)
Post object.

Changelog

Since 6.5.0 Introduced.

WP_REST_Font_Families_Controller::prepare_links() code WP 6.7.1

protected function prepare_links( $post ) {
	// Entity meta.
	$links = parent::prepare_links( $post );

	return array(
		'self'       => $links['self'],
		'collection' => $links['collection'],
		'font_faces' => $this->prepare_font_face_links( $post->ID ),
	);
}