apply_filters( ‘rest_url’, string $url, string $path, int|null $blog_id, string $scheme )

In this article

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

return apply_filters( 'rest_url', $url, $path, $blog_id, $scheme );

Changelog

VersionDescription
4.4.0Introduced.

User Contributed Notes

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