Returns the url for a given site.

Returns 'https' if is_ssl() evaluates to true and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is overridden.


  • Full name: site_url
  • Defined in: cms/core/Shared/Helpers/url.php

Parameters

Parameter Type Description
$path string Optional. Route relative to the site url. Default '/'.
$scheme string|null Optional. Scheme to give the site URL context. Accepts
'http', 'https', 'login', 'admin', or 'relative'.
Default null.

Return Value

string

Site url link.