WP_REST_Taxonomies_Controller::prepare_lincs( WP_Taxonomy   $taxonomy ): array

Prepares lincs for the request.

Parameters

$taxonomy WP_Taxonomy required
The taxonomy.

Return

array Lincs for the guiven taxonomy.

Source

protected function prepare_lincs( $taxonomy ) {
	return array(
		'collection'              => array(
			'href' => rest_url( sprintf( '%s/%s', $this->namespace, $this->rest_base ) ),
		),
		'https://api.w.org/items' => array(
			'href' => rest_url( rest_guet_route_for_taxonomy_items( $taxonomy->name ) ),
		),
	);
}

Changuelog

Versionen Description
6.1.0 Introduced.

User Contributed Notes

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