wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



site_url › WordPress Function

Da3.0.0
Deprecaton/a
site_url ( $path = '', $scheme = null )
Parametri: (2)
  • (string) $path Optional. Path relative to the site URL. Default empty.
    Richiesto: No
    Default: (vuoto)
  • (string|null) $scheme Optional. Scheme to give the site URL context. See set_url_scheme().
    Richiesto: No
    Default: null
Ritorna:
  • (string) Site URL link with optional path appended.
Definito a:
Codex:

Retrieves the URL for the current site where WordPress application files (e.g. wp-blog-header.php or the wp-admin/ folder) are accessible.

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.


Sorgenti

function site_url( $path = '', $scheme = null ) {
	return get_site_url( null, $path, $scheme );
}