set_url_scheme

Advertisement

Summery Summery

Sets the scheme for a URL.

Syntax Syntax

set_url_scheme( string $url, string|null $scheme = null )

Parameters Parameters

$url

(string) (Required) Absolute URL that includes a scheme

$scheme

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

Default value: null

Return Return

(string) $url URL with chosen scheme.

Source Source

File: wp-includes/link-template.php


			

Advertisement

Changelog Changelog

Changelog
Version Description
4.4.0 The 'rest' scheme was added.
3.4.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.