Prepares links for the request.
Parameters
$post
WP_Postrequired- Post object.
Source
protected function prepare_links( $post ) {
// Entity meta.
return array(
'self' => array(
'href' => rest_url( $this->namespace . '/font-families/' . $post->post_parent . '/font-faces/' . $post->ID ),
),
'collection' => array(
'href' => rest_url( $this->namespace . '/font-families/' . $post->post_parent . '/font-faces' ),
),
'parent' => array(
'href' => rest_url( $this->namespace . '/font-families/' . $post->post_parent ),
),
);
}
Changelog
Version | Description |
---|---|
6.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.