WP_REST_Font_Faces_Controller::prepare_links()
Prepares links for the request.
Method of the class: WP_REST_Font_Faces_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_Faces_Controller::prepare_links() WP REST Font Faces Controller::prepare links code WP 6.6.2
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 ), ), ); }