WPDev.one
Core Function
View Source on Trac ↗

set_url_scheme()

set_url_scheme( mixed $url, mixed $scheme = null )

Sets the scheme for a URL.

Parameters 2 required

Name / Type Description
$url
string

Absolute URL that includes a scheme

Required
mixed

(string | null) $scheme Optional. Scheme to give $url. Currently 'http', 'https', 'login', 'login_post', 'admin', 'relative', 'rest', 'rpc', or null. Default null.

Required

Return Value

(string)
URL with chosen scheme.

Function Information

Since Version
3.4.0
Source File
wp-includes/link-template.php
Advertisement