Uses
| Uses | Description |
|---|---|
| wp-includes/rest-api.php: rest_url() | Retrieves the URL to a REST endpoint. |
Prepares links for the request.
(array) (Required) The plugin item.
(array[])
File: wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php
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 ) ) ),
),
);
} | Version | Description |
|---|---|
| 5.5.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/prepare_links