WP_REST_Widget_Types_Controller::prepare_links( array $widget_type )
Prepares links for the widget type.
Parameters
- $widget_type
-
(array) (Required) Widget type data.
Return
(array) Links for the given widget type.
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php
protected function prepare_links( $widget_type ) { return array( 'collection' => array( 'href' => rest_url( sprintf( '%s/%s', $this->namespace, $this->rest_base ) ), ), 'self' => array( 'href' => rest_url( sprintf( '%s/%s/%s', $this->namespace, $this->rest_base, $widget_type['id'] ) ), ), ); }
Expand full source code Collapse full source code View on Trac View on GitHub
Changelog
Version | Description |
---|---|
5.8.0 | Introduced. |