set_url_scheme( string $url, string|null $scheme = null )
Sets the scheme for a URL.
Parameters
- $url
-
(Required) Absolute URL that includes a scheme
- $scheme
-
(Optional) Scheme to give $url. Currently 'http', 'https', 'login', 'login_post', 'admin', 'relative', 'rest', 'rpc', or null.
Default value: null
Return
(string) URL with chosen scheme.
Source
File: wp-includes/link-template.php
Changelog
Version | Description |
---|---|
4.4.0 | The 'rest' scheme was added. |
3.4.0 | Introduced. |