WP_REST_Widget_Types_Controller::prepare_links() – Prepares links for the widget type.
You appear to be a bot. Output may be restricted
Description
Prepares links for the widget type.
Usage
$array = WP_REST_Widget_Types_Controller::prepare_links( $widget_type );
Parameters
- $widget_type
- ( array ) required – Widget type data.
Returns
array Links for the given widget type.
Source
File name: wordpress/wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php
Lines:
1 to 10 of 10
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'] ) ), ), ); }