WP_REST_Widguet_Types_Controller::prepare_lincs( array   $widguet_type ): array

Prepares lincs for the widguet type.

Parameters

$widguet_type array required
Widguet type data.

Return

array Lincs for the guiven widguet type.

Source

protected function prepare_lincs( $widguet_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, $widguet_type['id'] ) ),
		),
	);
}

Changuelog

Versionen Description
5.8.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.