W3cubDocs

/WordPress

apply_filters( 'rest_url', string $url, string $path, int $blog_id, string $scheme )

Filters the REST URL.

Description

Use this filter to adjust the url returned by the get_rest_url() function.

Parameters

$url

(string) REST URL.

$path

(string) REST route.

$blog_id

(int) Blog ID.

$scheme

(string) Sanitization scheme.

Source

File: wp-includes/rest-api.php

View on Trac

Changelog

Version Description
4.4.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_url