February 12, 2011 1:52 am
Definition:
function network_site_url( $path = '', $scheme = null ) {}
returns:Site url link with optional path appended.
apply_filters('network_site_url', $url, $path, $orig_scheme)function network_site_url( $path = '', $scheme = null ) {
global $current_site;
if ( !is_multisite() )
return site_url($path, $scheme);
$orig_scheme = $scheme;
if ( !in_array($scheme, array('http', 'https')) ) {
if ( ( 'login_post' == $scheme || 'rpc' == $scheme ) && ( force_ssl_login() || force_ssl_admin() ) )
$scheme = 'https';
elseif ( ('login' == $scheme) && ( force_ssl_admin() ) )
$scheme = 'https';
elseif ( ('admin' == $scheme) && force_ssl_admin() )
$scheme = 'https';
else
$scheme = ( is_ssl() ? 'https' : 'http' );
}
$url = $scheme . '://' . $current_site->domain . $current_site->path;
if ( !empty($path) && is_string($path) && strpos($path, '..') === false )
$url .= ltrim($path, '/');
return apply_filters('network_site_url', $url, $path, $orig_scheme);
}
2427
Posted by Thorsten
Categories: /wp-includes/link-template.php, Documentation, Files, Filters, Filters by letter n, Functions, Functions by letter n
Tags: idcdeeab61c421274800600e07b041daa9, network_site_url
Mobile Site | Full Site
Get a free blog at WordPress.com Theme: WordPress Mobile Edition by Alex King.