WP_REST_Plugins_Controller::prepare_links( array $item ): array[]

Prepares links for the request.


Parameters

$item array Required
The plugin item.

Top ↑

Return

array[]


Top ↑

Source

File: wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php. View all references

protected function prepare_links( $item ) {
	return array(
		'self' => array(
			'href' => rest_url(
				sprintf(
					'%s/%s/%s',
					$this->namespace,
					$this->rest_base,
					substr( $item['_file'], 0, - 4 )
				)
			),
		),
	);
}


Top ↑

Changelog

Changelog
Version Description
5.5.0 Introduced.

Top ↑

User Contributed Notes

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