Prepares links for the request.
Parameters
$template
WP_Block_Templaterequired- Template.
Source
protected function prepare_links( $template ) {
$links = array(
'self' => array(
'href' => rest_url( sprintf( '/%s/%s/%s/%s/%d', $this->namespace, $this->parent_base, $template->id, $this->rest_base, $template->wp_id ) ),
),
'parent' => array(
'href' => rest_url( sprintf( '/%s/%s/%s', $this->namespace, $this->parent_base, $template->id ) ),
),
);
return $links;
}
Changelog
Version | Description |
---|---|
6.4.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.