On this page
apply_filters( 'rest_url', string $url, string $path, int|null $blog_id, string $scheme )
Filters the REST URL.
Description
Use this filter to adjust the url returned by the get_rest_url() function.
Parameters
$urlstring-
REST URL.
$pathstring-
REST route.
$blog_idint|null-
Blog ID.
$schemestring-
Sanitization scheme.
Source
File: wp-includes/rest-api.php. View all references
return apply_filters( 'rest_url', $url, $path, $blog_id, $scheme );
Related
Used By
| Used By | Description |
|---|---|
| get_rest_url() wp-includes/rest-api.php | Retrieves the URL to a REST endpoint on a site. |
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_url