WP_REST_Font_Families_Controller::prepare_font_face_links( int $font_family_id ): array

In this article

Prepares child font face links for the request.

Parameters

$font_family_idintrequired
Font family post ID.

Return

array Links for the child font face posts.

Source

protected function prepare_font_face_links( $font_family_id ) {
	$font_face_ids = $this->get_font_face_ids( $font_family_id );
	$links         = array();
	foreach ( $font_face_ids as $font_face_id ) {
		$links[] = array(
			'embeddable' => true,
			'href'       => rest_url( sprintf( '%s/%s/%s/font-faces/%s', $this->namespace, $this->rest_base, $font_family_id, $font_face_id ) ),
		);
	}
	return $links;
}

User Contributed Notes

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