site_url

Definition:
function site_url( $path = '', $scheme = null ) {}

Retrieve the site url for the current site.
Returns the ‘site_url’ option with the appropriate protocol, ‘https’ if is_ssl() and ‘http’ otherwise. If $scheme is ‘http’ or ‘https’, is_ssl() is overridden.

Parameters

  • string $path: Optional. Path relative to the site url.
  • string $scheme: Optional. Scheme to give the site url context. Currently ‘http’, ‘https’, ‘login’, ‘login_post’, or ‘admin’.

Return values

returns:Site url link with optional path appended.

Source code

function site_url( $path = '', $scheme = null ) {

	return get_site_url(null, $path, $scheme);

}

2897

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: