WPDev.one
Core Function
View Source on Trac ↗

get_site_url()

get_site_url( mixed $blog_id = null, mixed $path = '', mixed $scheme = null )

Retrieves the URL for a given site where WordPress application files

Parameters 2 required

Name / Type Description
(int

| null) $blog_id Optional. Site ID. Default null (current site).

Required
$path
string

Optional. Path relative to the site URL. Default empty.

mixed

(string | null) $scheme Optional. Scheme to give the site URL context. Accepts 'http', 'https', 'login', 'login_post', 'admin', or 'relative'. Default null.

Required

Return Value

(string)
Site URL link with optional path appended.

Function Information

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